Simplify (% current-column tab-width) code
This commit is contained in:
parent
3c41823824
commit
c84bc953d9
1 changed files with 1 additions and 4 deletions
|
@ -91,10 +91,7 @@ possible, or just one char if that's not possible."
|
|||
(not (doom-point-in-string-p))
|
||||
(>= (abs (save-excursion (skip-chars-backward " \t")))
|
||||
(setq current-column (current-column))))
|
||||
(let ((movement (% current-column tab-width)))
|
||||
(when (= movement 0)
|
||||
(setq movement tab-width))
|
||||
(delete-char (- movement))))
|
||||
(delete-char (- (1+ (% (1- current-column) tab-width)))))
|
||||
|
||||
;; Otherwise do a regular delete
|
||||
((delete-char -1)))))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue