From e0901a1efb05727111eb88d1b27b7d1a23a87365 Mon Sep 17 00:00:00 2001 From: Albert Cervin Date: Sun, 23 Jun 2024 22:30:37 +0200 Subject: Fix buffer list switch and search/replace Fix the buffer list return key action when buffers have the same name. Previously, it would pick the first it could find in the buffer list with the correct buffer name instead of the selected one. Now it uses text properties to pass the actual buffer pointer along instead. This however exposed a problem with the clearing of properties and where in the frame it happens. Search and replace highlighting assumed that they could color things in their respective command executions. However, ideally coloring should happen in update functions so now both search and replace implement the coloring in update hooks for the buffer they are operating on. For replace, this was already kinda how it worked and could be adapted with minimal effort. Search on the other hand needed a bit more rework. --- src/main/cmds.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/main/cmds.h') diff --git a/src/main/cmds.h b/src/main/cmds.h index a392e06..a258ce5 100644 --- a/src/main/cmds.h +++ b/src/main/cmds.h @@ -2,6 +2,7 @@ struct commands; void register_global_commands(struct commands *commands, void (*terminate_cb)()); +void teardown_global_commands(void); void register_buffer_commands(struct commands *commands); -- cgit v1.2.3