Skip to content

Make sure text is escaped when the width is negative. #510

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 16, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions rust/messages.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,10 +118,10 @@ def escaped_text(self, view, indent):
# Sometimes Sublime responds with a negative number, guard
# against that.
if width < 0:
return self.text

text = textwrap.fill(self.text, width=width,
break_long_words=False, break_on_hyphens=False)
text = self.text
else:
text = textwrap.fill(self.text, width=width,
break_long_words=False, break_on_hyphens=False)

def escape_and_link(i_txt):
i, txt = i_txt
Expand Down