forked from qt-creator/qt-creator
FakeVim: Restrict tabstop size
The default minimum of QSpinBox is 0 which is not allowed for vim's tabstop in general. It has to be some positive integer. Beside disallowing the unsupported value it also fixes some crash which could happen if using the zero as tabstop width. (div by zero) Fixes: QTCREATORBUG-28082 Change-Id: I8913b1c28b8ec239ecdf2306fe8861669ccb9d56 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -114,6 +114,7 @@ FakeVimSettings::FakeVimSettings()
|
||||
tabStop.setToolTip(Tr::tr("Vim tabstop option."));
|
||||
|
||||
#ifndef FAKEVIM_STANDALONE
|
||||
tabStop.setRange(1, 99);
|
||||
backspace.setDisplayStyle(FvStringAspect::LineEditDisplay);
|
||||
isKeyword.setDisplayStyle(FvStringAspect::LineEditDisplay);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user