nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 1c3bfa9f2b23e8176be8895b9dc9b9c574a706d6
parent feb89db8a00f271f171b3e878548a7a944e71823
Author: David Lawrence Ramsey <pooka109@gmail.com>
Date:   Tue, 13 Sep 2005 04:53:44 +0000

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

Diffstat:
MChangeLog | 6++++++
Msrc/global.c | 4++--
Msrc/move.c | 18++++--------------
Msrc/proto.h | 6++----
Msrc/text.c | 2+-
5 files changed, 15 insertions(+), 21 deletions(-)

diff --git 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 @@ -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 @@ -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 @@ -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 @@ -153,7 +153,7 @@ void do_backspace(void) { if (openfile->current != openfile->fileage || openfile->current_x > 0) { - do_left(FALSE); + do_left(); do_delete(); } }