commit 38b74e699329dfad4f0c2c6420f7ff5361fcadd3
parent 7f3dc2de465e862279f4742e9f85dad3caa2287b
Author: Benno Schulenberg <bensberg@justemail.net>
Date: Mon, 28 Mar 2016 18:53:49 +0000
Not bothering to put back the cursor in the edit window, as it is off
anyway, and it will be placed back when it's needed: in the main loop.
This prevents a segfault laid bare by r5763: when trying, at startup,
to open a directory, there really is no open buffer yet.
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5766 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Diffstat:
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,8 @@
+2016-03-28 Benno Schulenberg <bensberg@justemail.net>
+ * src/winio.c (statusbar): Don't bother putting back the cursor in
+ the edit window, as it is off anyway, and will be placed back in the
+ main loop. This prevents a segfault when trying to open a directory.
+
2016-03-23 Benno Schulenberg <bensberg@justemail.net>
* src/search.c (findnextstr): Prevent the internal spell checker from
finding the first occurrence twice. And delete the piece of dead code
diff --git a/src/winio.c b/src/winio.c
@@ -2147,9 +2147,6 @@ void statusbar(const char *msg, ...)
wattroff(bottomwin, interface_color_pair[STATUS_BAR].pairnum);
wnoutrefresh(bottomwin);
- /* Leave the cursor in the edit window, not in the statusbar. */
- reset_cursor();
- wnoutrefresh(edit);
disable_cursorpos = TRUE;