Introduction
Introduction Statistics Contact Development Disclaimer Help
tFix crash in undo/redo - ledit - Text editor (WIP)
git clone git://lumidify.org/ledit.git (fast, but not encrypted)
git clone https://lumidify.org/git/ledit.git (encrypted, but very slow)
Log
Files
Refs
README
LICENSE
---
commit 7960e435bff5c425f81274ab0058b443575cb574
parent 89c0c124f4a4097292b1e5baa5e158cdfb6a81f7
Author: lumidify <[email protected]>
Date: Thu, 23 Dec 2021 23:42:00 +0100
Fix crash in undo/redo
Diffstat:
M view.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/view.c b/view.c
t@@ -1946,14 +1946,13 @@ view_undo(ledit_view *view, int num) {
/* FIXME: maybe wipe selection (although I guess this
currently isn't possible in visual mode anyways) */
for (int i = 0; i < num; i++) {
- size_t old_line = view->cur_line;
+ view_wipe_line_cursor_attrs(view, view->cur_line);
undo_status s = buffer_undo(view->buffer, view->mode, &view->c…
if (view->mode == NORMAL) {
view->cur_index = view_get_legal_normal_pos(
view, view->cur_line, view->cur_index
);
}
- view_wipe_line_cursor_attrs(view, old_line);
view_set_line_cursor_attrs(view, view->cur_line, view->cur_ind…
if (s != UNDO_NORMAL) {
window_show_message(view->window, undo_state_to_str(s)…
t@@ -1965,14 +1964,13 @@ view_undo(ledit_view *view, int num) {
void
view_redo(ledit_view *view, int num) {
for (int i = 0; i < num; i++) {
- size_t old_line = view->cur_line;
+ view_wipe_line_cursor_attrs(view, view->cur_line);
undo_status s = buffer_redo(view->buffer, view->mode, &view->c…
if (view->mode == NORMAL) {
view->cur_index = view_get_legal_normal_pos(
view, view->cur_line, view->cur_index
);
}
- view_wipe_line_cursor_attrs(view, old_line);
view_set_line_cursor_attrs(view, view->cur_line, view->cur_ind…
if (s != UNDO_NORMAL) {
window_show_message(view->window, undo_state_to_str(s)…
You are viewing proxied material from lumidify.org. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.