Skip to content

Commit ac2b3da

Browse files
bors[bot]ehuss
andcommitted
Merge #315
315: Some minor word-wrapping fixes. r=ehuss a=ehuss Co-authored-by: Eric Huss <[email protected]>
2 parents 24e5f8e + fbd2c96 commit ac2b3da

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

rust/messages.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,11 @@ def escaped_text(self, view, indent):
114114
# Rough assumption of using monospaced font, but should be
115115
# reasonable in most cases for proportional fonts.
116116
width = view.viewport_extent()[0] / view.em_width() - 5
117+
# Sometimes Sublime responds with a negative number, guard
118+
# against that.
119+
if width < 0:
120+
return self.text
121+
117122
text = textwrap.fill(self.text, width=width,
118123
break_long_words=False, break_on_hyphens=False)
119124

rust/themes.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ def icon(level):
275275
links.append(
276276
self.LINK_TMPL.format(
277277
url=url, text='See Also:', path=path))
278-
text = batch.primary_message.escaped_text(view, '')
278+
text = batch.primary_message.escaped_text(view, '&nbsp;' + icon('none'))
279279
if not text and not children:
280280
return None
281281
content = self.PRIMARY_MSG_TMPL.format(

0 commit comments

Comments
 (0)