diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2006-10-30 13:27:24 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2006-10-30 13:27:24 +0000 |
commit | 0eae5234a18f52b40ec797aed1c58374a1680247 (patch) | |
tree | fc85d9cc4e53580d4cd69265055ab2ec1f1bc063 | |
parent | 3fb24d37f864eebf955a4d3092296efab8be4ae9 (diff) | |
download | weechat-0eae5234a18f52b40ec797aed1c58374a1680247.zip |
Fixed crash with Ctrl-T (transpose) and one char on line (bug #18153)
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | src/gui/gui-action.c | 3 | ||||
-rw-r--r-- | weechat/ChangeLog | 3 | ||||
-rw-r--r-- | weechat/src/gui/gui-action.c | 3 |
4 files changed, 8 insertions, 4 deletions
@@ -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--; |