vim-css-color icon indicating copy to clipboard operation
vim-css-color copied to clipboard

only catching first 3 letters of 6 letter hex colors

Open mitechie opened this issue 14 years ago • 5 comments

I'm finding that the plugin is only reading the first 3 colors in some cases.

http://uploads.mitechie.com/vim-css-color.png

mitechie avatar May 17 '11 11:05 mitechie

I've had this happen too. Sorry for not providing steps to reproduce, can't figure out what they would be!

henrycatalinismith avatar May 17 '11 16:05 henrycatalinismith

I’ve tried to track this down but I can’t find any sensible reason why it won’t work. By all rights it should! Yet it doesn’t. And equally, no change I’ve made to try to fix it has worked. At this point I have to wonder if it’s not actually a bug in Vim.

ap avatar May 20 '11 11:05 ap

Ah, I found it. The reason was that the matches were being set up without \> and vim is satisfied to match just #bbb for a match group that includes both /#bbb/ and /#bbbbbb/. By making them /#bbb\>/ and /#bbbbbb\>/ vim is forced to pick the actual matching one.

So this is fixed now in my fork.

ap avatar May 22 '11 01:05 ap

Awesome, good news AP. Thanks for the heads up. Hopefully it can get merged in.

mitechie avatar May 26 '11 16:05 mitechie

You could just take my fork. It has diverged far from the code @skammer patched and is much faster. He would have to either adopt my code or re-do the change for the old code, but he hasn’t commented on any tickets or made any commits since his original patch. I don’t know if he’s interested in active maintenance, though maybe he just got busy.

ap avatar May 26 '11 17:05 ap