mirror of
https://github.com/vale981/emacs-jupyter
synced 2025-03-05 07:41:37 -05:00
Better logic when preserving margins
This commit is contained in:
parent
a5587e3b0b
commit
6fe839063d
1 changed files with 3 additions and 4 deletions
|
@ -972,10 +972,9 @@ kernel that the REPL buffer is connected to."
|
|||
;; disappear. It doesn't happen all the time though. Work around this by
|
||||
;; setting the margins after a window configuration change.
|
||||
(defun jupyter-repl-preserve-window-margins ()
|
||||
(unless (window-parameter nil 'min-margins)
|
||||
(set-window-parameter
|
||||
nil 'min-margins (cons jupyter-repl-prompt-margin-width 0))
|
||||
(set-window-margins nil jupyter-repl-prompt-margin-width)))
|
||||
(let ((margins (window-margins)))
|
||||
(unless (and margins (= (car margins) jupyter-repl-prompt-margin-width))
|
||||
(set-window-margins nil jupyter-repl-prompt-margin-width))))
|
||||
|
||||
;;; Completion
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue