Skip to content

Commit aba5b4e

Browse files
authored
Merge pull request #510 from ehuss/negative-text-escape
Make sure text is escaped when the width is negative.
2 parents a2a6ae9 + 16c040e commit aba5b4e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

rust/messages.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,10 @@ def escaped_text(self, view, indent):
118118
# Sometimes Sublime responds with a negative number, guard
119119
# against that.
120120
if width < 0:
121-
return self.text
122-
123-
text = textwrap.fill(self.text, width=width,
124-
break_long_words=False, break_on_hyphens=False)
121+
text = self.text
122+
else:
123+
text = textwrap.fill(self.text, width=width,
124+
break_long_words=False, break_on_hyphens=False)
125125

126126
def escape_and_link(i_txt):
127127
i, txt = i_txt

0 commit comments

Comments
 (0)