Skip to content

Commit

Permalink
Turn jtsx-last-buffer-chars-modifed-tick into buffer local variable.
Browse files Browse the repository at this point in the history
  • Loading branch information
llemaitre19 committed Feb 1, 2024
1 parent 7fa03a2 commit 35f464f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jtsx.el
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,11 @@ See `treesit-font-lock-level' for more informations."

(defvar jtsx-ts-indent-rules)

(defvar jtsx-last-buffer-chars-modifed-tick 0)
(defvar-local jtsx-last-buffer-chars-modifed-tick 0)

(defun jtsx-save-buffer-chars-modified-tick ()
"Save the returned value of `buffer-chars-modified-tick' function."
(setq jtsx-last-buffer-chars-modifed-tick (buffer-chars-modified-tick)))
(setq-local jtsx-last-buffer-chars-modifed-tick (buffer-chars-modified-tick)))

(defun jtsx-command-modified-buffer-p ()
"Check if last command has modified the buffer."
Expand Down

0 comments on commit 35f464f

Please sign in to comment.