mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-26 23:34:44 +02:00
Fix tab settings in UDL regression
Bug reported here: https://community.notepad-plus-plus.org/topic/21866/notepad-8-1-5-rc-3?_=1632620635740 The regression is due to e5a800722b7b31c835ae9855c54087354fb1304b
This commit is contained in:
parent
a7a700145d
commit
2f7490abab
@ -3549,9 +3549,7 @@ void ScintillaEditView::runMarkers(bool doHide, size_t searchStart, bool endOfDo
|
||||
|
||||
void ScintillaEditView::setTabSettings(Lang *lang)
|
||||
{
|
||||
if (!lang) return;
|
||||
|
||||
if (lang->_tabSize != -1 && lang->_tabSize != 0)
|
||||
if (lang && lang->_tabSize != -1 && lang->_tabSize != 0)
|
||||
{
|
||||
if (lang->_langID == L_JAVASCRIPT)
|
||||
{
|
||||
@ -3566,7 +3564,7 @@ void ScintillaEditView::setTabSettings(Lang *lang)
|
||||
else
|
||||
{
|
||||
const NppGUI & nppgui = NppParameters::getInstance().getNppGUI();
|
||||
execute(SCI_SETTABWIDTH, nppgui._tabSize > 0 ? nppgui._tabSize : lang->_tabSize);
|
||||
execute(SCI_SETTABWIDTH, nppgui._tabSize > 0 ? nppgui._tabSize : 4);
|
||||
execute(SCI_SETUSETABS, !nppgui._tabReplacedBySpace);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user