Skip to content

Commit 369b0fb

Browse files
committed
Make sure there is no active selection
1 parent efa9d0b commit 369b0fb

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/PluginDefinition.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,9 @@ void onBeforeSave(HWND hWnd, uptr_t idFrom)
362362
int automatic_fold = static_cast<int>(::SendMessage(curScintilla, SCI_GETAUTOMATICFOLD, 0, 0));
363363
SendMessage(curScintilla, SCI_SETAUTOMATICFOLD, 0, 0);
364364

365+
// Make sure there is no active selection
366+
SendMessage(curScintilla, SCI_CLEARSELECTIONS, 0, 0);
367+
365368
// Trailing whitespace needs to be trimmed before 'insert_final_newline' is
366369
// applied.
367370
if (trim_trailing_whitespace == NPPEC_BOOLVAL_TRUE) {

0 commit comments

Comments
 (0)