summaryrefslogtreecommitdiff
path: root/lib/readline/text.c~
diff options
context:
space:
mode:
Diffstat (limited to 'lib/readline/text.c~')
-rw-r--r--lib/readline/text.c~9
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/readline/text.c~ b/lib/readline/text.c~
index a8c0a538..4e1aa0cb 100644
--- a/lib/readline/text.c~
+++ b/lib/readline/text.c~
@@ -189,10 +189,13 @@ _rl_replace_text (text, start, end)
{
int n;
+ n = 0;
rl_begin_undo_group ();
- rl_delete_text (start, end + 1);
+ if (start <= end)
+ rl_delete_text (start, end + 1);
rl_point = start;
- n = rl_insert_text (text);
+ if (*text)
+ n = rl_insert_text (text);
rl_end_undo_group ();
return n;
@@ -583,7 +586,7 @@ rl_skip_csi_sequence (count, key)
RL_SETSTATE (RL_STATE_MOREINPUT);
do
ch = rl_read_key ();
- while (ch >= 0x20 && ch < 0x40)
+ while (ch >= 0x20 && ch < 0x40);
RL_UNSETSTATE (RL_STATE_MOREINPUT);
return 0;