mirror of git://git.sv.gnu.org/nano.git
Letting +1 and +,1 make nano start on line one column one, overriding
a position from history. This fixes Savannah bug #42538. git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5003 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
This commit is contained in:
parent
b14fbf719f
commit
3060ce36d3
|
@ -15,6 +15,8 @@
|
|||
* src/nano.c: Fix compilation with --enable-tiny --enable-mouse.
|
||||
* doc/man/nanorc.5, doc/texinfo/nano.texi: Explain better what "all"
|
||||
means when rebinding keys. This is a fix for Savannah bug #42552.
|
||||
* src/nano.c (main): Make +1 and +,1 start on line one column one,
|
||||
overriding a historical position. This fixes Savannah bug #42538.
|
||||
|
||||
2014-06-19 Benno Schulenberg <bensberg@justemail.net>
|
||||
* src/nano.c (window_init): Rename 'no_more_space()' to 'more_space()'
|
||||
|
|
12
src/nano.c
12
src/nano.c
|
@ -2102,10 +2102,8 @@ void do_output(char *output, size_t output_len, bool allow_cntrls)
|
|||
int main(int argc, char **argv)
|
||||
{
|
||||
int optchr;
|
||||
ssize_t startline = 1;
|
||||
/* Line to try and start at. */
|
||||
ssize_t startcol = 1;
|
||||
/* Column to try and start at. */
|
||||
ssize_t startline = 0, startcol = 0;
|
||||
/* Target line and column when specified on the command line. */
|
||||
#ifndef DISABLE_WRAPJUSTIFY
|
||||
bool fill_used = FALSE;
|
||||
/* Was the fill option used? */
|
||||
|
@ -2716,7 +2714,7 @@ int main(int argc, char **argv)
|
|||
* new buffers. */
|
||||
{
|
||||
int i = optind + 1;
|
||||
ssize_t iline = 1, icol = 1;
|
||||
ssize_t iline = 0, icol = 0;
|
||||
|
||||
for (; i < argc; i++) {
|
||||
/* If there's a +LINE or +LINE,COLUMN flag here, it is
|
||||
|
@ -2728,7 +2726,7 @@ int main(int argc, char **argv)
|
|||
else {
|
||||
open_buffer(argv[i], FALSE);
|
||||
|
||||
if (iline > 1 || icol > 1) {
|
||||
if (iline > 0 || icol > 0) {
|
||||
do_gotolinecolumn(iline, icol, FALSE, FALSE, FALSE,
|
||||
FALSE);
|
||||
iline = 1;
|
||||
|
@ -2778,7 +2776,7 @@ int main(int argc, char **argv)
|
|||
precalc_multicolorinfo();
|
||||
#endif
|
||||
|
||||
if (startline > 1 || startcol > 1)
|
||||
if (startline > 0 || startcol > 0)
|
||||
do_gotolinecolumn(startline, startcol, FALSE, FALSE, FALSE,
|
||||
FALSE);
|
||||
#ifndef DISABLE_HISTORIES
|
||||
|
|
Loading…
Reference in New Issue