FindPrevSubwordOffset() public méthode

public FindPrevSubwordOffset ( int offset ) : int
offset int
Résultat int
Exemple #1
0
		static void PreviousWord (TextEditorData data, bool subword)
		{
			int oldLine = data.Caret.Line;

			int caretOffset = data.Caret.Offset;
			int offset = subword ? data.FindPrevSubwordOffset (caretOffset) : data.FindPrevWordOffset (caretOffset);
			if (caretOffset != offset && data.CanEdit (oldLine) && data.CanEdit (data.Caret.Line)) {
				data.Remove (offset, caretOffset - offset);
			}
		}
		static void PreviousWord (TextEditorData data, bool subword)
		{
			int oldLine = data.Caret.Line;
			int offset = subword? data.FindPrevSubwordOffset (data.Caret.Offset) : data.FindPrevWordOffset (data.Caret.Offset);
			if (data.Caret.Offset != offset && data.CanEdit (oldLine) && data.CanEdit (data.Caret.Line)) {
				data.Remove (offset, data.Caret.Offset - offset);
				data.Caret.Offset = offset;
				if (oldLine != data.Caret.Line)
					data.Document.CommitLineToEndUpdate (data.Caret.Line);
			}
		}
Exemple #3
0
        static void PreviousWord(TextEditorData data, bool subword)
        {
            int oldLine = data.Caret.Line;

            int caretOffset = data.Caret.Offset;
            int offset      = subword ? data.FindPrevSubwordOffset(caretOffset) : data.FindPrevWordOffset(caretOffset);

            if (caretOffset != offset && data.CanEdit(oldLine) && data.CanEdit(data.Caret.Line))
            {
                data.Remove(offset, caretOffset - offset);
            }
        }
Exemple #4
0
        static void PreviousWord(TextEditorData data, bool subword)
        {
            int oldLine = data.Caret.Line;
            int offset  = subword? data.FindPrevSubwordOffset(data.Caret.Offset) : data.FindPrevWordOffset(data.Caret.Offset);

            if (data.Caret.Offset != offset && data.CanEdit(oldLine) && data.CanEdit(data.Caret.Line))
            {
                data.Remove(offset, data.Caret.Offset - offset);
                data.Caret.Offset = offset;
                if (oldLine != data.Caret.Line)
                {
                    data.Document.CommitLineToEndUpdate(data.Caret.Line);
                }
            }
        }
Exemple #5
0
 public static void PreviousSubword(TextEditorData data)
 {
     using (var undo = data.OpenUndoGroup()) {
         data.Caret.Offset = data.FindPrevSubwordOffset(data.Caret.Offset);
     }
 }
		public static void PreviousSubword (TextEditorData data)
		{
			data.Caret.Offset = data.FindPrevSubwordOffset (data.Caret.Offset);
		}
 public static void PreviousSubword(TextEditorData data)
 {
     data.Caret.Offset = data.FindPrevSubwordOffset(data.Caret.Offset);
 }
		public static void PreviousSubword (TextEditorData data)
		{
			using (var undo = data.OpenUndoGroup ()) {
				data.Caret.Offset = data.FindPrevSubwordOffset (data.Caret.Offset);
			}
		}