bufexplorer icon indicating copy to clipboard operation
bufexplorer copied to clipboard

Wishlist: indicate buffers with diff mode set

Open mgedmin opened this issue 9 years ago • 2 comments

Every now and then I do a :windo diffthis to compare a couple of buffers, and then I forget to turn the diff mode off when switch away to a different file to investigate something (jumping to tags etc.). Then it becomes rather difficult to find the buffer I was comparing with.

Wouldn't it be nice if bufexplorer could indicate which buffers have &diff mode set with a sigil of some kind, next to the '%h-' thingies?

mgedmin avatar Mar 05 '15 09:03 mgedmin

Hm, this might be impossible: &diff is a window-local option rather than a buffer-local option. I don't think you can access those for buffers not currently displayed in any window.

mgedmin avatar Mar 05 '15 11:03 mgedmin

How it could be possible to do..

  1. Switch on 'lazy' (i.e. no redraw) mode
  2. Cycle through buffers/tabs/windows and collect the diff mode setting
  3. Go back to your tab/window/buffer
  4. Restore 'lazy' mode.

But this looks too heavy, though. Will also trigger Buf/Tab/Window Enter/Leave autocmds...

ershov avatar Jan 18 '16 08:01 ershov