diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 87cb3a0f9..83a50cb91 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -7627,8 +7627,8 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa //--Status Bar Section--// bool willBeShown = nppGUI._statusBarShow; _statusBar.init(_hInst, hwnd, 6); - _statusBar.setPartWidth(STATUSBAR_DOC_SIZE, 250); - _statusBar.setPartWidth(STATUSBAR_CUR_POS, 300); + _statusBar.setPartWidth(STATUSBAR_DOC_SIZE, 200); + _statusBar.setPartWidth(STATUSBAR_CUR_POS, 250); _statusBar.setPartWidth(STATUSBAR_EOF_FORMAT, 80); _statusBar.setPartWidth(STATUSBAR_UNICODE_TYPE, 100); _statusBar.setPartWidth(STATUSBAR_TYPING_MODE, 30); diff --git a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp index ec3a7b597..929aadf09 100644 --- a/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp +++ b/PowerEditor/src/ScitillaComponent/ScintillaEditView.cpp @@ -2501,7 +2501,17 @@ void ScintillaEditView::columnReplace(ColumnModeInfos & cmi, int initial, int in cmi[i]._selRpos += totalDiff; int2str(str, stringSize, initial, base, nb, isZeroLeading); - + + bool hasVirtualSpc = cmi[i]._nbVirtualAnchorSpc > 0; + if (hasVirtualSpc) // if virtual space is present, then insert space + { + for (int j = 0, k = cmi[i]._selLpos; j < cmi[i]._nbVirtualCaretSpc ; j++, k++) + { + execute(SCI_INSERTTEXT, k, (LPARAM)" "); + } + cmi[i]._selLpos += cmi[i]._nbVirtualAnchorSpc; + cmi[i]._selRpos += cmi[i]._nbVirtualCaretSpc; + } execute(SCI_SETTARGETSTART, cmi[i]._selLpos); execute(SCI_SETTARGETEND, cmi[i]._selRpos); #ifdef UNICODE @@ -2513,7 +2523,17 @@ void ScintillaEditView::columnReplace(ColumnModeInfos & cmi, int initial, int in execute(SCI_REPLACETARGET, (WPARAM)-1, (LPARAM)str); #endif initial += incr; - totalDiff += diff; + if (hasVirtualSpc) + { + totalDiff += cmi[i]._nbVirtualAnchorSpc + lstrlen(str); + // Now there's no more virtual space + cmi[i]._nbVirtualAnchorSpc = 0; + cmi[i]._nbVirtualCaretSpc = 0; + } + else + { + totalDiff += diff; + } cmi[i]._selRpos += diff; } }