File tree Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Expand file tree Collapse file tree 2 files changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -215,10 +215,12 @@ def link(external=False):
215
215
print_comments ([item ])
216
216
else :
217
217
print_comments (item ['comments' ])
218
+ # Prevent syntax issues in long comment threads with code blocks
219
+ vim .command ("syntax sync fromstart" )
218
220
# Highlight OP username in comment titles
219
221
if 'level' not in item :
220
- vim .command ("syn clear Question" )
221
- vim .command ("syn match Question /%s/ contained" % item ['user' ])
222
+ vim .command ("syntax clear Question" )
223
+ vim .command ("syntax match Question /%s/ contained" % item ['user' ])
222
224
223
225
elif url :
224
226
if external :
Original file line number Diff line number Diff line change @@ -14,9 +14,6 @@ filetype plugin on
14
14
" Load ftplugin when opening .hackernews buffer
15
15
au ! BufRead ,BufNewFile * .hackernews set filetype = hackernews
16
16
17
- " Prevent syntax highlighting issues in long comment threads with code blocks
18
- au ! BufEnter * .hackernews syntax sync fromstart
19
-
20
17
21
18
" Set required defaults
22
19
if ! exists (" g:hackernews_stories" )
You can’t perform that action at this time.
0 commit comments