nkh / P5-App-Asciio

Plain ASCII diagram
https://nkh.github.io/P5-App-Asciio/
56 stars 4 forks source link

Polygon mode doesn't handle the "escape" key properly #176

Closed nkh closed 11 months ago

nkh commented 11 months ago

If you press "escape" while doing a polygon selection, pressing "x" doesn't exit anymore and lines continue to be drawn.

That needs to be fixed, either create your own sub group command with it's own escape key (the best) or propose a mode that's common to all selection types.

qindapao commented 11 months ago

@nkh Ok, I'll fix it when I'm free.

qindapao commented 11 months ago

@nkh

polygon_selc

https://github.com/qindapao/P5-App-Asciio/tree/fix_polygon_selc

Based on this question, and some of your suggestions, I modified the operating mode of polygon selection. It is now possible to expand selection and deselection. Deselect uses ctrl + left mouse button.

qindapao commented 11 months ago

@nkh I didn't change the style of the mouse pointer, I didn't find a suitable one. If I customize the mouse pointer later, I will add it.

nkh commented 11 months ago

@qindapao I think that it is much better, what do you think?

The cursor could be the same as for the other selection mode, a circle to add, and a cross to remove.

qindapao commented 11 months ago

@nkh

Yes, I think the current mode of operation is much better than last commit.

I will change the mouse pointer to be consistent with other selection modes when I turn on the computer next time.

qindapao commented 11 months ago

@nkh

https://github.com/qindapao/P5-App-Asciio/tree/fix_polygon_selc

Hello, I forced push and added mouse pointer changes.

nkh commented 11 months ago

@qindapao nice that you removed all details from all files and moved them to Selection.pm, there are two small remaining problems.

in the previous version, accessing polygon selection was done with keys 'sx', you went back to only 'x', you can do that in your user bindings if you want to but in the general Asciio bindings it should be via 'sx', I guess that this was an oversight.

I appreciate that you keep the vim bindings up to date, that makes my work much easier, but when you add multiple lines to default_bindings you need to add the same amount of line in vim_bindings. I keep them to the same length so I can scroll in both files att the same time to find discrepancies.

To scroll two files at the same time you do:

qindapao commented 11 months ago

@nkh ok. I'll deal with it later.I'm still not completely used to vim, it still needs time.I'll go out for a while and deal with it when I get back.

qindapao commented 11 months ago

@nkh

https://github.com/qindapao/P5-App-Asciio/tree/fix_polygon_selc

I've made the changes and forced push again

nkh commented 11 months ago

merged in c948c74