2009-09-03 Chris Allegretta <chrisa@asty.org>

* global.c (shortcut_init): Fix up/down keys not responding in the file browser,
          discovered by Hannes <mr_creosote@mutantwatch.de>.
        * move.c (do_up) - Fix another scrolling issue with softwrap when the
          cursor is beyond COLS, discovered by Hannes <mr_creosote@mutantwatch.de>.



git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@4408 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
Chris Allegretta 2009-09-03 23:29:14 +00:00
parent f8f9027295
commit bce7d404d9
3 changed files with 12 additions and 6 deletions

View File

@ -1,3 +1,9 @@
2009-09-03 Chris Allegretta <chrisa@asty.org>
* global.c (shortcut_init): Fix up/down keys not responding in the file browser,
discovered by Hannes <mr_creosote@mutantwatch.de>.
* move.c (do_up) - Fix another scrolling issue with softwrap when the
cursor is beyond COLS, discovered by Hannes <mr_creosote@mutantwatch.de>.
2009-09-02 Chris Allegretta <chrisa@asty.org>
* Attempt to check file writability and emit a warning on the status bar
if nano doesn't think the file can be written to. Feature originally

View File

@ -1079,10 +1079,10 @@ void shortcut_init(bool unjustify)
add_to_sclist(MALL, "kleft", DO_LEFT, 0, TRUE);
add_to_sclist(MMAIN, "^Q", XON_COMPLAINT, 0, TRUE);
add_to_sclist(MMAIN, "^S", XOFF_COMPLAINT, 0, TRUE);
add_to_sclist(MMAIN, "^P", DO_UP_VOID, 0, TRUE);
add_to_sclist(MMAIN, "kup", DO_UP_VOID, 0, TRUE);
add_to_sclist(MMAIN, "^N", DO_DOWN_VOID, 0, TRUE);
add_to_sclist(MMAIN, "kdown", DO_DOWN_VOID, 0, TRUE);
add_to_sclist(MMAIN|MBROWSER, "^P", DO_UP_VOID, 0, TRUE);
add_to_sclist(MMAIN|MBROWSER, "kup", DO_UP_VOID, 0, TRUE);
add_to_sclist(MMAIN|MBROWSER, "^N", DO_DOWN_VOID, 0, TRUE);
add_to_sclist(MMAIN|MBROWSER, "kdown", DO_DOWN_VOID, 0, TRUE);
add_to_sclist(MALL, "^A", DO_HOME, 0, TRUE);
add_to_sclist(MALL, "khome", DO_HOME, 0, TRUE);
add_to_sclist(MALL, "^E", DO_END, 0, TRUE);

View File

@ -488,7 +488,7 @@ void do_up(
)
return;
assert(openfile->current_y == openfile->current->lineno - openfile->edittop->lineno);
assert(ISSET(SOFTWRAP) || openfile->current_y == openfile->current->lineno - openfile->edittop->lineno);
/* Move the current line of the edit window up. */
openfile->current = openfile->current->prev;
@ -500,7 +500,7 @@ void do_up(
* smooth scrolling mode, or up half a page if we're not. If
* scroll_only is TRUE, scroll the edit window up one line
* unconditionally. */
if (openfile->current_y == 0
if (openfile->current_y == 0 || (ISSET(SOFTWRAP) && openfile->edittop->lineno == openfile->current->next->lineno)
#ifndef NANO_TINY
|| scroll_only
#endif