display_main_list();
if (startline > 1 || startcol > 1)
- do_gotolinecolumn(startline, startcol, FALSE, FALSE, FALSE);
+ do_gotolinecolumn(startline, startcol - 1, FALSE, FALSE, FALSE);
#ifndef NANO_SMALL
/* Return here after a SIGWINCH. */
#ifndef NANO_SMALL
search_history.current = search_history.next;
#endif
- do_gotolinecolumn(1, 1, TRUE, TRUE, FALSE);
+ do_gotolinecolumn(1, 0, TRUE, TRUE, FALSE);
/* Put answer up on the statusbar and
* fall through. */
default:
}
/* Do a bounds check. Display a warning on an out-of-bounds
- * line number only if we hit Enter at the statusbar prompt. */
+ * line number (which is one-based) or an out-of-bounds column
+ * number (which is zero-based) only if we hit Enter at the
+ * statusbar prompt. */
if (!parse_line_column(answer, &line, &column) || line < 1 ||
- column < 1) {
+ column < 0) {
if (i == 0)
statusbar(_("Come on, be reasonable"));
display_main_list();
if (line < 1)
line = 1;
- if (column < 1)
- column = 1;
+ if (column < 0)
+ column = 0;
}
if (current->lineno > line) {
;
}
- current_x = actual_x(current->data, column - 1);
- placewewant = column - 1;
+ current_x = actual_x(current->data, column);
+ placewewant = column;
/* If save_pos is TRUE, don't change the cursor position when
* updating the edit window. */