ProgerXP / Notepad2e

Word highlighting, simultaneous editing, split views, math evaluation, un/grep, comment reformatting, UAC elevation, complete regexps (PCRE), Lua lexers, DPI awareness and more (XP+)
Other
375 stars 52 forks source link

Edit Mode: implicit commit on Ctrl+Alt/Shift+Enter #357

Closed ProgerXP closed 2 years ago

ProgerXP commented 3 years ago

If Edit Mode is active, currently any version of Enter commits and stops. However, Enter with modifiers is actually a different operation than Enter so committing should be implicit just like when caret is moved outside of the edit region (or other cases).

In other words, Ctrl+Shift+Enter should (implicitly) commit and then it should insert a line below. Ctrl+Alt+Enter is similar.

Update: same should be done for Ctrl+A. But it's interesting that Arrow navigation does the implicit commit. Was it coded specifically?

Related to #403.

cshnik commented 2 years ago

Done.

Was it coded specifically?

Correct. This was a part of SCN_UPDATEUI-notification handler (came from Scintilla), SC_UPDATE_SELECTION code is processed to stop Edit Mode.