diff --git a/src/highlighters.cc b/src/highlighters.cc index 6d8eac7e..9d733521 100644 --- a/src/highlighters.cc +++ b/src/highlighters.cc @@ -1017,6 +1017,9 @@ struct TabulationHighlighter : Highlighter ++atom_it; } } + + if (atom_it == line.end()) + break; } } } diff --git a/test/regression/0-crash-on-tab-just-before-wrap-column/cmd b/test/regression/0-crash-on-tab-just-before-wrap-column/cmd new file mode 100644 index 00000000..8b137891 --- /dev/null +++ b/test/regression/0-crash-on-tab-just-before-wrap-column/cmd @@ -0,0 +1 @@ + diff --git a/test/regression/0-crash-on-tab-just-before-wrap-column/in b/test/regression/0-crash-on-tab-just-before-wrap-column/in new file mode 100644 index 00000000..ced27a60 --- /dev/null +++ b/test/regression/0-crash-on-tab-just-before-wrap-column/in @@ -0,0 +1 @@ +xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx wrapped diff --git a/test/regression/0-crash-on-tab-just-before-wrap-column/rc b/test/regression/0-crash-on-tab-just-before-wrap-column/rc new file mode 100644 index 00000000..96a09981 --- /dev/null +++ b/test/regression/0-crash-on-tab-just-before-wrap-column/rc @@ -0,0 +1 @@ +addhl global/ wrap