Skip to content

Commit effbfbb

Browse files
committed
fix to let ctrl-backspace delete from end of word
1 parent 653f2e2 commit effbfbb

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

rt-shell/objects/obj_shell/Step_0.gml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ if (!isOpen) {
4646
} else if (self.keyComboPressed([metaKey], vk_backspace) || (metaKey == vk_control && ord(keyboard_string) == 127)) {
4747
// delete characters from the cursor position to the preceding space or start of the line
4848
var precedingSpaceIndex = 1;
49-
for (var i = cursorPos; i > 1; i--) {
49+
// don't want to check for space at or before the cursor position, so start 2 back
50+
for (var i = cursorPos - 2; i > 1; i--) {
5051
if (string_char_at(consoleString, i) == " ") {
5152
precedingSpaceIndex = i;
5253
break;

0 commit comments

Comments
 (0)