summaryrefslogtreecommitdiff
path: root/src/buffer_utils.cc
diff options
context:
space:
mode:
authorJohannes Altmanninger <aclopte@gmail.com>2022-12-22 18:09:45 +0100
committerJohannes Altmanninger <aclopte@gmail.com>2022-12-27 18:24:55 +0100
commit8427379a5dfcf35af35fd5a7b26803e8727476e6 (patch)
tree5507945e06f4067199ef84b6006c8b33efc35f8f /src/buffer_utils.cc
parent8e8c2fb46d418236918c0dbddad8e48ae9e4e20d (diff)
Tweak selection-undo interaction with WinDisplay hooks
Each selection undo operation is surrounded by pair of begin_edition()/end_edition() calls. The original reason for adding these was that in one of my preliminary versions, a WinDisplay hook could break an undo chain, even if the hook did not affect selections at all. This has since been fixed. By surrounding the undo with begin_edition()/end_edition(), try to ensure that any selection modification that happens in a WinDisplay hook would not break the undo chain. Essentially this means that, after using <c-h> to undo a buffer change, this was meant to make sure that <c-k> could redo that buffer change. However, it turns out this actually doesn't work. The attached test case triggers an assertion. As described in the first paragraph, the only real-world motivation for this is gone, so let's simplify the behavior. The assertion fix means that we can test the next commit better.
Diffstat (limited to 'src/buffer_utils.cc')
0 files changed, 0 insertions, 0 deletions