aboutsummaryrefslogtreecommitdiff
path: root/README.md
diff options
context:
space:
mode:
authorFlorian Fischer <florian.fischer@muhq.space>2024-09-26 15:53:45 +0200
committerFlorian Fischer <florian.fischer@muhq.space>2024-09-26 15:53:45 +0200
commit3c458c6710ab77d6ec34f051de77435db9ccc089 (patch)
treea76c4b307ab3445e0c3ecd2c9688a56f198f0d8f /README.md
parent7e1eceeb9c8cc191ea6d84f47ee3064e1dad8610 (diff)
downloadvis-open-extend-3c458c6710ab77d6ec34f051de77435db9ccc089.tar.gz
vis-open-extend-3c458c6710ab77d6ec34f051de77435db9ccc089.zip
allow proper transparent WIN_OPEN event handling
Simply changing the file in a single WIN_OPEN event has one of two possible problems. 1. Problem: We keep the current window Then all previously ran WIN_OPEN event handlers have observed a wrong file path, leading to broken syntax highlighting for example. 2. Problem: Use a new window This solves the 1. Problem by emitting a new WIN_OPEN event with the correct file path. However, this leads to plugins like vis-cursors to jump to a possibly different line rendering vis-open-extend useless. The solution to both problems is to split our event handling in two parts: On the original event detect the file and the specified line. Change to the file in a new window, remember the line and stop the event handling for the first event. On the second WIN_OPEN event for the correct file path simply jump to the remembered line. This allows both plugins vis-open-extend and vis-cursors to work, if vis-open-extend is loaded after vis-cursors, so our event handler runs after the one from vis-cursors.
Diffstat (limited to 'README.md')
0 files changed, 0 insertions, 0 deletions