Add an update function
This commit is contained in:
		
							parent
							
								
									8fd156e918
								
							
						
					
					
						commit
						509db9bbde
					
				@ -127,6 +127,13 @@
 | 
			
		||||
  ;; Restore the original mode-line-format
 | 
			
		||||
  (setq mode-line-format center-content--original-mode-line-format))
 | 
			
		||||
 | 
			
		||||
(defun center-content-update ()
 | 
			
		||||
  "Updates the centering if `center-content-mode' is enabled."
 | 
			
		||||
  (interactive)
 | 
			
		||||
  (when (bound-and-true-p center-content-mode)
 | 
			
		||||
    (center-content--disable)
 | 
			
		||||
    (center-content--enable)))
 | 
			
		||||
 | 
			
		||||
;;;###autoload
 | 
			
		||||
(define-minor-mode center-content-mode
 | 
			
		||||
  "Toggle horizontal and vertical centering of buffer content.
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user