#include "Text.h"
#include "BranchList.h"
-#include "FloatList.h"
-#include "FuncStatus.h"
#include "Buffer.h"
-#include "buffer_funcs.h"
#include "BufferParams.h"
#include "BufferView.h"
-#include "Changes.h"
#include "Cursor.h"
#include "CutAndPaste.h"
#include "DispatchResult.h"
-#include "ErrorList.h"
#include "factory.h"
+#include "FloatList.h"
+#include "FuncStatus.h"
#include "FuncRequest.h"
#include "InsetList.h"
#include "Intl.h"
#include "support/lassert.h"
#include "support/limited_stack.h"
#include "support/lstrings.h"
-#include "support/lyxalgo.h"
-#include "support/lyxtime.h"
-#include "support/os.h"
#include "support/regex.h"
#include "mathed/InsetMathHull.h"
};
-static void insertSeparator(Cursor & cur, depth_type const depth)
+static void insertSeparator(Cursor const & cur, depth_type const depth)
{
Buffer & buf = *cur.buffer();
lyx::dispatch(FuncRequest(LFUN_PARAGRAPH_BREAK));
Paragraph const & nextpar = lastpar ? par : pars_[pit + 1];
pit_type prev = pit > 0 ? depthHook(pit, par.getDepth()) : pit;
if (prev < pit && cur.pos() == par.beginOfBody()
- && !par.size() && !par.isEnvSeparator(cur.pos())
+ && par.empty() && !par.isEnvSeparator(cur.pos())
&& !par.layout().keepempty
&& !par.layout().isCommand()
&& pars_[prev].layout() != par.layout()
// "auto_region_delete", which defaults to
// true (on).
- if (lyxrc.auto_region_delete && cur.selection())
+ if (lyxrc.auto_region_delete && cur.selection()) {
cutSelection(cur, false);
+ cur.setCurrentFont();
+ }
cur.clearSelection();
for (char_type c : cmd.argument())
// FIXME: an item inset would make things much easier.
-bool Text::inDescriptionItem(Cursor & cur) const
+bool Text::inDescriptionItem(Cursor const & cur) const
{
- Paragraph & par = cur.paragraph();
+ Paragraph const & par = cur.paragraph();
pos_type const pos = cur.pos();
pos_type const body_pos = par.beginOfBody();