mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
OC-3717 Can move cursor inside the placeholder if it came in it from the upper/bottom line
This commit is contained in:
+3
-3
@@ -619,12 +619,12 @@ public class EditorActionUtil {
|
||||
selectNonexpandableFold(editor);
|
||||
}
|
||||
|
||||
private final static Key<LogicalPosition> PREV_POS = Key.create("PREV_POS");
|
||||
private final static Key<VisualPosition> PREV_POS = Key.create("PREV_POS");
|
||||
public static void selectNonexpandableFold(Editor editor) {
|
||||
final CaretModel caretModel = editor.getCaretModel();
|
||||
final LogicalPosition pos = caretModel.getLogicalPosition();
|
||||
final VisualPosition pos = caretModel.getVisualPosition();
|
||||
|
||||
LogicalPosition prevPos = editor.getUserData(PREV_POS);
|
||||
VisualPosition prevPos = editor.getUserData(PREV_POS);
|
||||
|
||||
if (prevPos != null) {
|
||||
int columnShift = pos.line == prevPos.line ? pos.column - prevPos.column : 0;
|
||||
|
||||
@@ -196,7 +196,6 @@ public class CaretModelImpl implements CaretModel, PrioritizedDocumentListener,
|
||||
for (CaretListener listener : myCaretListeners) {
|
||||
listener.caretPositionChanged(event);
|
||||
}
|
||||
EditorActionUtil.selectNonexpandableFold(myEditor);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user