Fix wrong scroll bar value when switching tab/spaces

Signed-off-by: Loren Eteval <loren.eteval@proton.me>
This commit is contained in:
Loren Eteval
2023-09-07 00:15:55 +08:00
parent 0eaf974c06
commit ba8cbc5e42
+12 -1
View File
@@ -48,7 +48,18 @@ class SettingsChildAction(Action):
else:
APP().ShowTabAndSpacesInEditor = Switch.OFF
APP().ServerWidget.showTabAndSpacesIfNecessary()
# Reference
ServerWidget = APP().ServerWidget
currentFocus = ServerWidget.currentFocus
if currentFocus >= 0:
ServerWidget.saveScrollBarValue(currentFocus)
ServerWidget.showTabAndSpacesIfNecessary()
if currentFocus >= 0:
ServerWidget.restoreScrollBarValue(currentFocus)
class RoutingChildAction(Action):