Commit bce7d404 authored by Chris Allegretta's avatar Chris Allegretta
Browse files

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
parent f8f90272
Showing with 12 additions and 6 deletions
+12 -6
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> 2009-09-02 Chris Allegretta <chrisa@asty.org>
* Attempt to check file writability and emit a warning on the status bar * 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 if nano doesn't think the file can be written to. Feature originally
......
...@@ -1079,10 +1079,10 @@ void shortcut_init(bool unjustify) ...@@ -1079,10 +1079,10 @@ void shortcut_init(bool unjustify)
add_to_sclist(MALL, "kleft", DO_LEFT, 0, TRUE); add_to_sclist(MALL, "kleft", DO_LEFT, 0, TRUE);
add_to_sclist(MMAIN, "^Q", XON_COMPLAINT, 0, TRUE); add_to_sclist(MMAIN, "^Q", XON_COMPLAINT, 0, TRUE);
add_to_sclist(MMAIN, "^S", XOFF_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|MBROWSER, "^P", DO_UP_VOID, 0, TRUE);
add_to_sclist(MMAIN, "kup", DO_UP_VOID, 0, TRUE); add_to_sclist(MMAIN|MBROWSER, "kup", DO_UP_VOID, 0, TRUE);
add_to_sclist(MMAIN, "^N", DO_DOWN_VOID, 0, TRUE); add_to_sclist(MMAIN|MBROWSER, "^N", DO_DOWN_VOID, 0, TRUE);
add_to_sclist(MMAIN, "kdown", 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, "^A", DO_HOME, 0, TRUE);
add_to_sclist(MALL, "khome", DO_HOME, 0, TRUE); add_to_sclist(MALL, "khome", DO_HOME, 0, TRUE);
add_to_sclist(MALL, "^E", DO_END, 0, TRUE); add_to_sclist(MALL, "^E", DO_END, 0, TRUE);
......
...@@ -488,7 +488,7 @@ void do_up( ...@@ -488,7 +488,7 @@ void do_up(
) )
return; 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. */ /* Move the current line of the edit window up. */
openfile->current = openfile->current->prev; openfile->current = openfile->current->prev;
...@@ -500,7 +500,7 @@ void do_up( ...@@ -500,7 +500,7 @@ void do_up(
* smooth scrolling mode, or up half a page if we're not. If * smooth scrolling mode, or up half a page if we're not. If
* scroll_only is TRUE, scroll the edit window up one line * scroll_only is TRUE, scroll the edit window up one line
* unconditionally. */ * unconditionally. */
if (openfile->current_y == 0 if (openfile->current_y == 0 || (ISSET(SOFTWRAP) && openfile->edittop->lineno == openfile->current->next->lineno)
#ifndef NANO_TINY #ifndef NANO_TINY
|| scroll_only || scroll_only
#endif #endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment