summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2006-10-30 13:27:24 +0000
committerSebastien Helleu <flashcode@flashtux.org>2006-10-30 13:27:24 +0000
commit0eae5234a18f52b40ec797aed1c58374a1680247 (patch)
treefc85d9cc4e53580d4cd69265055ab2ec1f1bc063
parent3fb24d37f864eebf955a4d3092296efab8be4ae9 (diff)
downloadweechat-0eae5234a18f52b40ec797aed1c58374a1680247.zip
Fixed crash with Ctrl-T (transpose) and one char on line (bug #18153)
-rw-r--r--ChangeLog3
-rw-r--r--src/gui/gui-action.c3
-rw-r--r--weechat/ChangeLog3
-rw-r--r--weechat/src/gui/gui-action.c3
4 files changed, 8 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 74816bafe..82b6f3fe6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,10 +1,11 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
-ChangeLog - 2006-10-24
+ChangeLog - 2006-10-30
Version 0.2.2 (under dev!):
+ * fixed crash with Ctrl-T (transpose) and one char on line (bug #18153)
* added "modifier" in plugins API
* improved /plugin command
* fixed bug on ignore with "mode" IRC command (bug #18058)
diff --git a/src/gui/gui-action.c b/src/gui/gui-action.c
index 6529e1054..f8d36fbcd 100644
--- a/src/gui/gui-action.c
+++ b/src/gui/gui-action.c
@@ -414,7 +414,8 @@ gui_action_transpose_chars (t_gui_window *window)
if (window->buffer->has_input)
{
- if (window->buffer->input_buffer_pos > 0)
+ if ((window->buffer->input_buffer_pos > 0)
+ && (window->buffer->input_buffer_length > 1))
{
if (window->buffer->input_buffer_pos == window->buffer->input_buffer_length)
window->buffer->input_buffer_pos--;
diff --git a/weechat/ChangeLog b/weechat/ChangeLog
index 74816bafe..82b6f3fe6 100644
--- a/weechat/ChangeLog
+++ b/weechat/ChangeLog
@@ -1,10 +1,11 @@
WeeChat - Wee Enhanced Environment for Chat
===========================================
-ChangeLog - 2006-10-24
+ChangeLog - 2006-10-30
Version 0.2.2 (under dev!):
+ * fixed crash with Ctrl-T (transpose) and one char on line (bug #18153)
* added "modifier" in plugins API
* improved /plugin command
* fixed bug on ignore with "mode" IRC command (bug #18058)
diff --git a/weechat/src/gui/gui-action.c b/weechat/src/gui/gui-action.c
index 6529e1054..f8d36fbcd 100644
--- a/weechat/src/gui/gui-action.c
+++ b/weechat/src/gui/gui-action.c
@@ -414,7 +414,8 @@ gui_action_transpose_chars (t_gui_window *window)
if (window->buffer->has_input)
{
- if (window->buffer->input_buffer_pos > 0)
+ if ((window->buffer->input_buffer_pos > 0)
+ && (window->buffer->input_buffer_length > 1))
{
if (window->buffer->input_buffer_pos == window->buffer->input_buffer_length)
window->buffer->input_buffer_pos--;