summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Koslowski <koslowski@kit.edu>2016-10-21 09:20:22 +0200
committerSebastian Koslowski <koslowski@kit.edu>2016-10-21 09:20:22 +0200
commitdc5a05d68888a9924d1f15bc58a80c7e54bfffe0 (patch)
treecda59482a6c981c414c160a34b064ea50d3740b4
parent1624da7772f1ff57232e2f2024281547d483629c (diff)
grc: fix IndexError when consuming \b in console (#1043)
-rw-r--r--grc/gui/Dialogs.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/grc/gui/Dialogs.py b/grc/gui/Dialogs.py
index 1d114356c8..83ad9651b2 100644
--- a/grc/gui/Dialogs.py
+++ b/grc/gui/Dialogs.py
@@ -72,7 +72,7 @@ class TextDisplay(SimpleTextDisplay):
# for each \b delete one char from the buffer
back_count = 0
start_iter = self.get_buffer().get_end_iter()
- while line[back_count] == '\b':
+ while len(line) > back_count and line[back_count] == '\b':
# stop at the beginning of a line
if not start_iter.starts_line(): start_iter.backward_char()
back_count += 1