|
|
|
@ -677,7 +677,6 @@ delete_character :: proc(file: ^FileBuffer, delete_backwards: bool = false) {
|
|
|
|
file.modified = true
|
|
|
|
file.modified = true
|
|
|
|
clear_selection(file)
|
|
|
|
clear_selection(file)
|
|
|
|
} else if file.cursor_pos < len(file.content) && delete_backwards {
|
|
|
|
} else if file.cursor_pos < len(file.content) && delete_backwards {
|
|
|
|
fmt.println("cursor_pos:", file.cursor_pos, "len(file.content):", len(file.content))
|
|
|
|
|
|
|
|
before := file.content[:file.cursor_pos]
|
|
|
|
before := file.content[:file.cursor_pos]
|
|
|
|
after := file.content[file.cursor_pos+1:]
|
|
|
|
after := file.content[file.cursor_pos+1:]
|
|
|
|
file.content = fmt.aprintf("%s%s", before, after)
|
|
|
|
file.content = fmt.aprintf("%s%s", before, after)
|
|
|
|
|