Skip to content

Commit

Permalink
note some todos
Browse files Browse the repository at this point in the history
  • Loading branch information
countvajhula committed Jun 13, 2024
1 parent cb8c7e1 commit 8ae71d4
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions rigpa-view-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@
;; a mode for navigating pages
;; TODO: region does not persist on entering mode, e.g. for
;; use in "narrow" functionality
;; TODO: once inside view mode, shifting and then zooming
;; should zoom into the new center of the screen, not
;; the original cursor location (see below for more)

(require 'evil)
(require 'hydra)
Expand Down Expand Up @@ -214,6 +217,14 @@
(defun rigpa--on-view-mode-entry ()
"Actions to take upon entry into view mode."
(setq rigpa-view--original-position (point))
;; TODO: retain original point position but for the purposes of the view
;; consider the midpoint of the current view as the reference point
;; then, upon exit, if the original location is still visible, preserve it
;; otherwise select the center (this logic is already implemented for "quit"
;; and should be reused)
;; (move-to-window-line nil)
;; currently, zooming past a certain level causes original point to
;; "drag" view there
(blink-cursor-mode -1)
(internal-show-cursor nil nil))

Expand Down
2 changes: 2 additions & 0 deletions rigpa-window-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,8 @@ encountered while navigating to the present one, to be treated as the
last window for 'flashback' ('Alt-tab') purposes. The flash should
happen quickly enough not to be noticeable."
(interactive)
;; TODO: in some cases when a REPL window (maybe large > 2500 lines) is open
;; this doesn't seem to restore the target window after the "excursion"
(unless (eq (selected-window) (rigpa-window-original-window))
(let ((inhibit-redisplay t)) ;; not sure if this is doing anything but FWIW
(save-window-excursion
Expand Down

0 comments on commit 8ae71d4

Please sign in to comment.