Skip to content

Commit

Permalink
[fix] search for ``` with noerror, when completing precode
Browse files Browse the repository at this point in the history
  • Loading branch information
zevlg committed Nov 15, 2023
1 parent 0ab9407 commit 140c044
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion telega-company.el
Original file line number Diff line number Diff line change
Expand Up @@ -408,7 +408,7 @@ Sort modes by usage of current Emacs session."
(candidates
(all-completions arg (telega-company--language-names)))
(post-completion
(if (save-excursion (re-search-forward "^```"))
(if (save-excursion (re-search-forward "^```" nil 'noerror))
(forward-char)
(insert "\n")
(save-excursion (insert "\n```"))))
Expand Down

0 comments on commit 140c044

Please sign in to comment.