mirror of
				https://github.com/larstvei/Focus.git
				synced 2025-11-04 02:00:11 +00:00 
			
		
		
		
	Split up `focus-move-focus'
This commit is contained in:
		
							parent
							
								
									307df45c69
								
							
						
					
					
						commit
						f310fa1c31
					
				
							
								
								
									
										14
									
								
								focus.el
									
									
									
									
									
								
							
							
						
						
									
										14
									
								
								focus.el
									
									
									
									
									
								
							@ -138,14 +138,18 @@ argument."
 | 
				
			|||||||
                   (make-list foregrounds foreground)))))
 | 
					                   (make-list foregrounds foreground)))))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defun focus-move-focus ()
 | 
					(defun focus-move-focus ()
 | 
				
			||||||
  "Move `focus-pre-overlay' and `focus-post-overlay'.
 | 
					  "Moves the focused section according to `focus-bounds'.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
If function `focus-mode' is enabled, this command fires after
 | 
					If `focus-mode' is enabled, this command fires after each
 | 
				
			||||||
each command."
 | 
					command."
 | 
				
			||||||
  (let* ((bounds (focus-bounds)))
 | 
					  (let* ((bounds (focus-bounds)))
 | 
				
			||||||
    (when bounds
 | 
					    (when bounds
 | 
				
			||||||
      (move-overlay focus-pre-overlay  (point-min) (car bounds))
 | 
					      (focus-move-overlays (car bounds) (cdr bounds)))))
 | 
				
			||||||
      (move-overlay focus-post-overlay (cdr bounds) (point-max)))))
 | 
					
 | 
				
			||||||
 | 
					(defun focus-move-overlays (low high)
 | 
				
			||||||
 | 
					  "Move `focus-pre-overlay' and `focus-post-overlay'."
 | 
				
			||||||
 | 
					  (move-overlay focus-pre-overlay  (point-min) low)
 | 
				
			||||||
 | 
					  (move-overlay focus-post-overlay high (point-max)))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
(defun focus-init ()
 | 
					(defun focus-init ()
 | 
				
			||||||
  "This function is run when command `focus-mode' is enabled.
 | 
					  "This function is run when command `focus-mode' is enabled.
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
		Reference in New Issue
	
	Block a user