From 916f182ce6df764283a7dd37ad681f5752e7503a Mon Sep 17 00:00:00 2001 From: Info Teddy Date: Sat, 18 Jan 2020 18:39:39 -0800 Subject: [PATCH] Set ed.keydelay when backspacing an empty line Similar to 2ebccbc3e9a06b4148e8014808ef6fe45e298c8d, there's also a long-standing bug where if you backspace an empty line (and this time, the line IS actually already empty, not merely emptied-earlier-in-the-frame), the game will quickly delete more blank lines if there are any above the blank line you deleted. Again, this is annoying too, if you so happen to need to use lots of blank lines. To fix this, it's simple - just set ed.keydelay to 6 when the game backspaces an empty line. Then it won't be so trigger-happy in deleting blank lines. --- desktop_version/src/editor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/desktop_version/src/editor.cpp b/desktop_version/src/editor.cpp index 6ec05ba4..c96ba37a 100644 --- a/desktop_version/src/editor.cpp +++ b/desktop_version/src/editor.cpp @@ -3870,6 +3870,7 @@ void editorinput( KeyPoll& key, Graphics& dwgfx, Game& game, mapclass& map, enti } } key.keybuffer=ed.sb[ed.pagey+ed.sby]; + ed.keydelay=6; } ed.sb[ed.pagey+ed.sby]=key.keybuffer;