+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
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);
)
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;
* 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