git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 0/2] mergetools: vimdiff3: fix regression

From
Felipe Contreras <felipe.contreras@gmail.com>
Date
Aug 2, 2022, 21:41 UTC
Message-ID
<20220802214134.681300-1-felipe.contreras@gmail.com>
Hello,

I wrote vimdiff3 to leverage both the power of git's diff3 and vim's diff mode, but commit 0041797449 broke that.

Here you can see how it used to work:
https://i.snipboard.io/hSdfkj.jpg
The added and changed lines are properly highlighted.

After I fix the conflicts vim still properly highlights which lines were changed, and even what specific characters were modified:

https://i.snipboard.io/HvpULI.jpg
Now I get absolutely nothing:
https://i.snipboard.io/HXMui4.jpg

To get the highlighting the content has to be in a window, and only *after* the diff mode has done its job can it be hidden. The current code does nothing of the sort.

Additionally, every time I run the command I get an annoying message:
  "./content_LOCAL_8975" 6L, 28B
  "./content_BASE_8975" 6 lines, 29 bytes
  "./content_REMOTE_8975" 6 lines, 29 bytes
  "content" 16 lines, 115 bytes
  Press ENTER or type command to continue
Because that's what `bufdo` does

Here's the patch that restores the intended behavior so vimdiff3 actually does something.

Additionally I noticed that vimdiff3 relied on specific values of `diffopt`, specifically `closeoff` not being set. This worked fine in my setup, but vim has `closeoff` enabled by default. So I'm sending a patch to make it work regardless of the user configuration.

Felipe Contreras (2):
  mergetools: vimdiff3: make it work as intended
  mergetools: vimdiff3: fix diffopt options
 mergetools/vimdiff | 38 ++++++++++++++++++++++++--------------
 1 file changed, 24 insertions(+), 14 deletions(-)
-- 
2.37.1.313.ge269dbcbc5
Next: Felipe Contreras
Message 1 of 15 in “mergetools: vimdiff3: fix regression”
  1. 0/2 mergetools: vimdiff3: fix regressionFelipe Contreras, Aug 2, 2022
  2. 1/2 mergetools: vimdiff3: make it work as intendedFelipe Contreras, Aug 2, 2022
  3. 2/2 mergetools: vimdiff3: fix diffopt optionsFelipe Contreras, Aug 2, 2022
  4. Fernando RamosAug 6, 2022
  5. Fernando RamosAug 6, 2022
  6. Felipe ContrerasAug 6, 2022
  7. Fernando RamosAug 6, 2022
  8. vimdiff: fix 'vimdiff3' behavior (colors + no extra key press)Fernando Ramos, Aug 6, 2022
  9. Felipe ContrerasAug 6, 2022
  10. Fernando RamosAug 6, 2022
  11. vimdiff: fix 'vimdiff3' behavior (colors + no extra key press)Fernando Ramos, Aug 6, 2022
  12. Felipe ContrerasAug 7, 2022
  13. Felipe ContrerasAug 6, 2022
  14. Fernando RamosAug 6, 2022
  15. Felipe ContrerasAug 7, 2022

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.