summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSébastien Helleu <flashcode@flashtux.org>2017-04-25 07:20:34 +0200
committerSébastien Helleu <flashcode@flashtux.org>2017-04-25 07:20:34 +0200
commit2a43f459470e2aa4033271504fb2102e8fd0813d (patch)
treec1875469f38f17f8f0251ff8780a0f32166a143c
parenta96d27f2362e9c18abc77e858da273765c1cee63 (diff)
downloadweechat-2a43f459470e2aa4033271504fb2102e8fd0813d.zip
core: fix command /cursor stop (do not toggle cursor mode) (closes #964)
-rw-r--r--ChangeLog.adoc1
-rw-r--r--src/core/wee-command.c2
-rw-r--r--src/gui/gui-cursor.c11
-rw-r--r--src/gui/gui-cursor.h1
4 files changed, 14 insertions, 1 deletions
diff --git a/ChangeLog.adoc b/ChangeLog.adoc
index d64d7a16f..82ac32543 100644
--- a/ChangeLog.adoc
+++ b/ChangeLog.adoc
@@ -42,6 +42,7 @@ Improvements::
Bug fixes::
+ * core: fix command /cursor stop (do not toggle cursor mode) (issue #964)
* core: fix delayed refresh when the signal SIGWINCH is received (terminal resized), send signal "signal_sigwinch" after refreshes (issue #902)
* irc: fix parsing of DCC filename
* irc: fix double decoding of IRC colors in messages sent/displayed by commands /msg and /query (issue #943)
diff --git a/src/core/wee-command.c b/src/core/wee-command.c
index 365c795c4..6496a0732 100644
--- a/src/core/wee-command.c
+++ b/src/core/wee-command.c
@@ -1674,7 +1674,7 @@ COMMAND_CALLBACK(cursor)
if (string_strcasecmp (argv[1], "stop") == 0)
{
- gui_cursor_mode_toggle ();
+ gui_cursor_mode_stop ();
return WEECHAT_RC_OK;
}
diff --git a/src/gui/gui-cursor.c b/src/gui/gui-cursor.c
index dd0ba9d60..52d3d079e 100644
--- a/src/gui/gui-cursor.c
+++ b/src/gui/gui-cursor.c
@@ -75,6 +75,17 @@ gui_cursor_mode_toggle ()
}
/*
+ * Stops cursor mode.
+ */
+
+void
+gui_cursor_mode_stop ()
+{
+ if (gui_cursor_mode)
+ gui_cursor_mode_toggle ();
+}
+
+/*
* Sets debug for cursor mode.
*/
diff --git a/src/gui/gui-cursor.h b/src/gui/gui-cursor.h
index 53b6ae8f7..2b52ebbb3 100644
--- a/src/gui/gui-cursor.h
+++ b/src/gui/gui-cursor.h
@@ -30,6 +30,7 @@ extern int gui_cursor_y;
/* cursor functions */
extern void gui_cursor_mode_toggle ();
+extern void gui_cursor_mode_stop ();
extern void gui_cursor_debug_set (int debug);
extern void gui_cursor_move_xy (int x, int y);
extern void gui_cursor_move_add_xy (int add_x, int add_y);