static void NextWord (TextEditorData data, bool subword) { int oldLine = data.Caret.Line; int offset = subword? data.FindNextSubwordOffset (data.Caret.Offset) : data.FindNextWordOffset (data.Caret.Offset); if (data.Caret.Offset != offset && data.CanEdit (oldLine) && data.CanEdit (data.Caret.Line)) { data.Remove (data.Caret.Offset, offset - data.Caret.Offset); data.Document.CommitLineToEndUpdate (data.Caret.Line); } }
static void NextWord (TextEditorData data, bool subword) { int oldLine = data.Caret.Line; int caretOffset = data.Caret.Offset; int offset = subword? data.FindNextSubwordOffset (caretOffset) : data.FindNextWordOffset (caretOffset); if (caretOffset != offset && data.CanEdit (oldLine) && data.CanEdit (data.Caret.Line)) { data.Remove (caretOffset, offset - caretOffset); } }
static void NextWord(TextEditorData data, bool subword) { int oldLine = data.Caret.Line; int caretOffset = data.Caret.Offset; int offset = subword? data.FindNextSubwordOffset(caretOffset) : data.FindNextWordOffset(caretOffset); if (caretOffset != offset && data.CanEdit(oldLine) && data.CanEdit(data.Caret.Line)) { data.Remove(caretOffset, offset - caretOffset); } }
static void NextWord(TextEditorData data, bool subword) { int oldLine = data.Caret.Line; int offset = subword? data.FindNextSubwordOffset(data.Caret.Offset) : data.FindNextWordOffset(data.Caret.Offset); if (data.Caret.Offset != offset && data.CanEdit(oldLine) && data.CanEdit(data.Caret.Line)) { data.Remove(data.Caret.Offset, offset - data.Caret.Offset); data.Document.CommitLineToEndUpdate(data.Caret.Line); } }
public static void NextSubword(TextEditorData data) { using (var undo = data.OpenUndoGroup()) { data.Caret.Offset = data.FindNextSubwordOffset(data.Caret.Offset); } }
public static void NextSubword (TextEditorData data) { data.Caret.Offset = data.FindNextSubwordOffset (data.Caret.Offset); }
public static void NextSubword(TextEditorData data) { data.Caret.Offset = data.FindNextSubwordOffset(data.Caret.Offset); }
public static void NextSubword (TextEditorData data) { using (var undo = data.OpenUndoGroup ()) { data.Caret.Offset = data.FindNextSubwordOffset (data.Caret.Offset); } }