[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/osm a6335090e9 33/77: Handle multiple windows
From: |
ELPA Syncer |
Subject: |
[elpa] externals/osm a6335090e9 33/77: Handle multiple windows |
Date: |
Mon, 7 Mar 2022 08:58:06 -0500 (EST) |
branch: externals/osm
commit a6335090e9287976a187d3b2159279af44b02b89
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Handle multiple windows
---
osm.el | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/osm.el b/osm.el
index 8563258a2e..c3ebd2eef9 100644
--- a/osm.el
+++ b/osm.el
@@ -500,7 +500,14 @@ We need two distinct images which are not `eq' for the
display properties.")
(let* ((size (expt 2 osm--zoom))
(meter-per-pixel (/ (* 156543.03 (cos (/ (osm--lat) (/ 180.0
float-pi)))) size))
(meter '(1 5 10 50 100 500 1000 5000 10000 50000 100000 500000
1000000 5000000 10000000))
+ (windows (or (get-buffer-window-list) (list (frame-root-window))))
+ (win-width (cl-loop for w in windows maximize (window-pixel-width
w)))
+ (win-height (cl-loop for w in windows maximize (window-pixel-height
w)))
(idx 0))
+ (setq osm--wx (/ win-width 2)
+ osm--wy (/ win-height 2)
+ osm--nx (1+ (ceiling win-width 256))
+ osm--ny (1+ (ceiling win-height 256)))
(while (and (< idx (1- (length meter))) (< (/ (nth (1+ idx) meter)
meter-per-pixel) 100))
(cl-incf idx))
(setq meter (nth idx meter))
@@ -521,10 +528,6 @@ We need two distinct images which are not `eq' for the
display properties.")
(if (>= meter 1000) (/ meter 1000) meter)
(if (>= meter 1000) "km" "m"))
'(:eval (osm--queue-info))))
- (setq osm--wx (/ (window-pixel-width) 2)
- osm--wy (/ (window-pixel-height) 2)
- osm--nx (1+ (ceiling (window-pixel-width) 256))
- osm--ny (1+ (ceiling (window-pixel-height) 256)))
(erase-buffer)
(dotimes (_j osm--ny)
(insert (concat (make-string osm--nx ?\s) "\n")))
@@ -600,8 +603,8 @@ We need two distinct images which are not `eq' for the
display properties.")
(rename-buffer name 'unique)))
(when (or (not (and osm--x osm--y)) at)
(osm--set-coordinates (or at (osm--home-coordinates))))
- (osm--update)
- (pop-to-buffer (current-buffer)))))
+ (prog1 (pop-to-buffer (current-buffer))
+ (osm--update)))))
;;;###autoload
(defun osm-goto (lat lon zoom)
- [elpa] externals/osm 42b9222e93 06/77: Make download slightly more robust, (continued)
- [elpa] externals/osm 42b9222e93 06/77: Make download slightly more robust, ELPA Syncer, 2022/03/07
- [elpa] externals/osm ad12c93f57 01/77: Initial commit, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 7a1d920492 59/77: Display bookmarks in map, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 25d891088f 70/77: Emacs 27 base64 encoding fallback, ELPA Syncer, 2022/03/07
- [elpa] externals/osm ec97b1d1c0 23/77: Add separate hook function, ELPA Syncer, 2022/03/07
- [elpa] externals/osm ee64b96509 56/77: Add map variant, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 1bd4751bcf 34/77: Better link names, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 7a50000e1e 58/77: Add separate resize function, revert tile cache, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 4c9337bf79 69/77: Update README, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 76b41f5fb5 51/77: Add keybindings, ELPA Syncer, 2022/03/07
- [elpa] externals/osm a6335090e9 33/77: Handle multiple windows,
ELPA Syncer <=
- [elpa] externals/osm 2fbf12f0ef 46/77: seq is not needed, ELPA Syncer, 2022/03/07
- [elpa] externals/osm c2c7dff887 22/77: Compact server configuration, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 7ce1d26c88 67/77: Extract osm--make-tile, ELPA Syncer, 2022/03/07
- [elpa] externals/osm ff8ff68b4d 65/77: Check if bookmarks are present, ELPA Syncer, 2022/03/07
- [elpa] externals/osm cb191d426f 76/77: Version 0.2, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 8e8e4583f5 74/77: More robust mouse dragging, ELPA Syncer, 2022/03/07
- [elpa] externals/osm d776cdb343 42/77: Fix melpa issues (See https://github.com/melpa/melpa/pull/7936), ELPA Syncer, 2022/03/07
- [elpa] externals/osm 5b82b32201 28/77: Add server descriptions, ELPA Syncer, 2022/03/07
- [elpa] externals/osm 832bce78f8 72/77: Implement proper map dragging with the mouse, ELPA Syncer, 2022/03/07
- [elpa] externals/osm df844cd56b 30/77: Add osm-rename command, ELPA Syncer, 2022/03/07