Fix unexpected column jump post brace match

Fix #13433, close #13441
pull/13444/head
Alan Kilborn 2 years ago committed by Don Ho
parent 24d3a69f0f
commit a67a5f7170

@ -1654,6 +1654,11 @@ void Notepad_plus::command(int id)
_pEditView->execute(SCI_GOTOPOS, braceOpposite);
else
_pEditView->execute(SCI_SETSEL, std::min<intptr_t>(braceAtCaret, braceOpposite), std::max<intptr_t>(braceAtCaret, braceOpposite) + 1); // + 1 so we always include the ending brace in the selection.
// Update Scintilla's knowledge about what column the caret is in, so that if user
// does up/down arrow as first navigation after the brace-match operation,
// the caret doesn't jump to an unexpected column
_pEditView->execute(SCI_CHOOSECARETX);
}
}
break;

Loading…
Cancel
Save