Skip to content

Commit

Permalink
Control column we get in the chat auto fill mode
Browse files Browse the repository at this point in the history
Control it with the `visual-fill-column-extra-text-width`

Version -> 0.8.253
  • Loading branch information
zevlg committed Mar 10, 2024
1 parent f0c9eeb commit 801ff61
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
10 changes: 7 additions & 3 deletions telega-chat.el
Original file line number Diff line number Diff line change
Expand Up @@ -6649,9 +6649,13 @@ containing QUERY sent by specified sender."
(interactive (list (get-buffer-window)))

(when (or (null win) (eq (selected-window) win))
(let ((new-fill-column (1- (/ (- (window-width win 'pixels)
(line-number-display-width 'pixels))
(telega-chars-xwidth 1)))))
(let ((new-fill-column (- (window-width win)
(with-selected-window win
(line-number-display-width))
(or (car visual-fill-column-extra-text-width)
0)
(or (cdr visual-fill-column-extra-text-width)
1))))
(when (and new-fill-column
(> new-fill-column 15) ;XXX ignore too narrow window
(not (eq new-fill-column telega-chat-fill-column)))
Expand Down
4 changes: 2 additions & 2 deletions telega.el
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
;; Keywords: comm
;; Package-Requires: ((emacs "27.1") (visual-fill-column "1.9") (rainbow-identifiers "0.2.2"))
;; URL: https://github.com/zevlg/telega.el
;; Version: 0.8.252
(defconst telega-version "0.8.252")
;; Version: 0.8.253
(defconst telega-version "0.8.253")
(defconst telega-server-min-version "0.7.7")
(defconst telega-tdlib-min-version "1.8.24")
(defconst telega-tdlib-max-version nil)
Expand Down

0 comments on commit 801ff61

Please sign in to comment.