vim-unimpaired icon indicating copy to clipboard operation
vim-unimpaired copied to clipboard

workaround for :move bug with folds. fixes #96

Open jebaum opened this issue 8 years ago • 10 comments

In addition to the workaround, I added a silent! to the MoveSelectionDown() function, as I couldn't see a good reason why it wasn't already there, and assumed it was an oversight. Let me know if it was left out for a reason.

jebaum avatar Mar 19 '16 09:03 jebaum

silent! is fine but but it definitely shouldn't apply to the fdm dance. In fact by doing so you've missed the fact you have a syntax error that completely breaks things.

tpope avatar Mar 19 '16 17:03 tpope

Can you be more specific? I tested it locally and it works perfectly for me, if something is wrong I doubt it's a syntax error

jebaum avatar Mar 20 '16 18:03 jebaum

I'm on mobile but it seems like a | is missing that definitely shouldn't be locally. Either that or for some weird reason it works anyway. Cant check until tonight

jebaum avatar Mar 20 '16 18:03 jebaum

Yes a | is missing. But point being there's no reason to embed all that inside a string eval to begin with.

tpope avatar Mar 20 '16 20:03 tpope

I agree it's missing, but have you pulled this locally and tried it? The map works, although I honestly don't know why, I would expect it not to now that I've looked more carefully. I am not sure how you would like to see this implemented if not with a string eval, but I'm happy to change it, I just want to see this functionality merged asap

jebaum avatar Mar 21 '16 04:03 jebaum

I see now, fdm isn't getting set back to the value that was saved, although I'm still surprised the move works at all. Fixed

jebaum avatar Mar 21 '16 04:03 jebaum

Take your additions and move them outside the quotes onto their own lines.

tpope avatar Mar 21 '16 11:03 tpope

fixed. do you think it would be better to use window local fdm? setlocal, let &l:fdm ?

jebaum avatar Mar 22 '16 04:03 jebaum

changed it to use local values, that seems much cleaner. tested it and it works fine. should be ready to merge now I think

jebaum avatar Mar 22 '16 04:03 jebaum

ping

jebaum avatar Apr 11 '16 23:04 jebaum