From: David Lawrence Ramsey Date: Tue, 13 Sep 2005 04:53:44 +0000 (+0000) Subject: remove do_(left|right)()'s ability to optionally not update the current X-Git-Tag: v1.3.9~29 X-Git-Url: https://git.wh0rd.org/?a=commitdiff_plain;h=1c3bfa9f2b23e8176be8895b9dc9b9c574a706d6;p=nano.git remove do_(left|right)()'s ability to optionally not update the current line, as this was only used in do_backspace(), and it didn't always update the screen properly git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@3017 35c25a1d-7b9e-4130-9fde-d3aeb78583b8 --- diff --git a/ChangeLog b/ChangeLog index 9b3fc4d9..63b82c32 100644 --- a/ChangeLog +++ b/ChangeLog @@ -158,6 +158,12 @@ CVS code - nano.texi, and nanorc.sample. (DLR, suggested by Mike Frysinger) - Update email address. Changes to faq.html and AUTHORS. (DLR) + - Remove do_(left|right)()'s ability to optionally not update + the current line, as this was only used in do_backspace(), and + it didn't always update the screen properly. Changes to + shortcut_init(), do_left(), do_right(), and do_backspace(); + removal of do_left_void() and do_right_void(). (DLR; problem + found by Mike Frysinger) - color.c: - Remove unneeded fcntl.h include. (DLR) - chars.c: diff --git a/src/global.c b/src/global.c index 7465e0e7..56835bd5 100644 --- a/src/global.c +++ b/src/global.c @@ -497,11 +497,11 @@ void shortcut_init(bool unjustify) sc_init_one(&main_list, NANO_FORWARD_KEY, N_("Forward"), IFHELP(nano_forward_msg, NANO_NO_KEY), NANO_NO_KEY, - NANO_NO_KEY, VIEW, do_right_void); + NANO_NO_KEY, VIEW, do_right); sc_init_one(&main_list, NANO_BACK_KEY, N_("Back"), IFHELP(nano_back_msg, NANO_NO_KEY), NANO_NO_KEY, - NANO_NO_KEY, VIEW, do_left_void); + NANO_NO_KEY, VIEW, do_left); sc_init_one(&main_list, NANO_HOME_KEY, N_("Home"), IFHELP(nano_home_msg, NANO_NO_KEY), NANO_NO_KEY, diff --git a/src/move.c b/src/move.c index e2953c1d..ae432999 100644 --- a/src/move.c +++ b/src/move.c @@ -550,7 +550,7 @@ void do_down(void) } } -void do_left(bool allow_update) +void do_left(void) { size_t pww_save = openfile->placewewant; @@ -566,16 +566,11 @@ void do_left(bool allow_update) openfile->placewewant = xplustabs(); - if (allow_update && need_horizontal_update(pww_save)) + if (need_horizontal_update(pww_save)) update_line(openfile->current, openfile->current_x); } -void do_left_void(void) -{ - do_left(TRUE); -} - -void do_right(bool allow_update) +void do_right(void) { size_t pww_save = openfile->placewewant; @@ -593,11 +588,6 @@ void do_right(bool allow_update) openfile->placewewant = xplustabs(); - if (allow_update && need_horizontal_update(pww_save)) + if (need_horizontal_update(pww_save)) update_line(openfile->current, openfile->current_x); } - -void do_right_void(void) -{ - do_right(TRUE); -} diff --git a/src/proto.h b/src/proto.h index 3b05394e..dfc9ba16 100644 --- a/src/proto.h +++ b/src/proto.h @@ -334,10 +334,8 @@ void do_home(void); void do_end(void); void do_up(void); void do_down(void); -void do_left(bool allow_update); -void do_left_void(void); -void do_right(bool allow_update); -void do_right_void(void); +void do_left(void); +void do_right(void); /* Public functions in nano.c. */ filestruct *make_new_node(filestruct *prevnode); diff --git a/src/text.c b/src/text.c index 6fcd19f2..4744e258 100644 --- a/src/text.c +++ b/src/text.c @@ -153,7 +153,7 @@ void do_backspace(void) { if (openfile->current != openfile->fileage || openfile->current_x > 0) { - do_left(FALSE); + do_left(); do_delete(); } }