Re: Cursor Position on Paste

2015-11-27 Thread john lunzer
Ahh, that makes sense now. I guess I'd call this option, "save_cursor_position_on_copy". I can put that on the todo list. On Thursday, November 26, 2015 at 11:20:08 AM UTC-5, Chris George wrote: > > Hi John, > > My intent was to have Leo consistently put the cursor where it was when > the

Re: Cursor Position on Paste

2015-11-26 Thread john lunzer
> > It seems to be something to do with whether the cursor is at the beginning > of a selection or not. When it is on a new line, the cursor always goes to > the end. When it is at the head of a selection, it sticks to the front of > the pasted string. > This is the exact and only behavior I

Re: Cursor Position on Paste

2015-11-26 Thread Chris George
Hi John, My intent was to have Leo consistently put the cursor where it was when the string was copied to the clipboard, no matter the destination. If I select the string right to left and the cursor is at the beginning of the string when I Ctrl-C, then the cursor should be at the beginning of

Re: Cursor Position on Paste

2015-11-25 Thread 'Terry Brown' via leo-editor
On Wed, 25 Nov 2015 08:22:00 -0800 (PST) Chris George wrote: > Hi John, > > Thanks for all the work. My Python/Qt/OS is the same as your test > environment. For me the cursor still *always *goes to the end of the > string on paste, no matter how I select the string. > >

Re: Cursor Position on Paste

2015-11-25 Thread john lunzer
I just tested a fresh install on a fresh virtual machine (Linux Mint 17.2 KDE, which is a great Leo test environment). Booted into the Live ISO and didn't download or install anything except for Leo from github. Leo 5.1-final, build 20151122092056, Sun Nov 22 09:20:56 CST 2015 Not running from

Re: Cursor Position on Paste

2015-11-25 Thread Chris George
Hi Terry and John, Testing on a vanilla instance of Leo. (Thanks Terry) Select a string by click-drag right to left with the mouse or Shift-Arrow key. Ctrl-C to copy it with the cursor at the beginning of the string. Navigate to the end of the document. Hit enter. Ctrl-V to paste. Shift-Home

Re: Cursor Position on Paste

2015-11-25 Thread Chris George
Hi John, Thanks for all the work. My Python/Qt/OS is the same as your test environment. For me the cursor still *always *goes to the end of the string on paste, no matter how I select the string. So it must be something in my settings. I pull from git every single time I start Leo, it is

Re: Cursor Position on Paste

2015-11-22 Thread john lunzer
I'm going to install a linux virtual machine on my windows computer and test this out with a fresh install. On Friday, November 20, 2015 at 7:34:00 PM UTC-5, john lunzer wrote: > > Okay, thanks for testing it out. The behavior *does* work for me, so I'm > not having an issue on my end. I'll try

Re: Cursor Position on Paste

2015-11-20 Thread john lunzer
This change has been checked in and is active for body text only. It is on by default so you should be able to test immediately after update. I ran the unit tests for text commands and all passed. Please let me know if you run into any strange behavior or crashes. On Thursday, November 19,

Re: Cursor Position on Paste

2015-11-20 Thread Chris George
Leo 5.1-final, build 20151119195910, Thu Nov 19 19:59:10 CST 2015 Git repo info: branch = master, commit = c46e332967ae Python 2.7.6, PyQt version 4.8.6 linux2 Hi John, The behaviour has not changed for me at all, no matter whether I select the string using the keyboard or the mouse. The

Re: Cursor Position on Paste

2015-11-20 Thread Chris George
Hi John, That makes no difference. Chris On Fri, Nov 20, 2015 at 8:20 AM, john lunzer wrote: > You shouldn't need to but please try adding @bool cursor_stay_on_paste = > True to your settings in myLeoSettings.leo. > > If that does not enable the behavior I will have to look

Re: Cursor Position on Paste

2015-11-20 Thread john lunzer
You shouldn't need to but please try adding @bool cursor_stay_on_paste = True to your settings in myLeoSettings.leo. If that does not enable the behavior I will have to look into it further. On Friday, November 20, 2015 at 10:52:53 AM UTC-5, Chris George wrote: > > Leo 5.1-final, build

Re: Cursor Position on Paste

2015-11-20 Thread john lunzer
I'm wondering if it is a Linux specific issue related to how I check if the cursor is in the body editor. Can anyone on a windows machine confirm that the new behavior is working? On Friday, November 20, 2015 at 11:38:51 AM UTC-5, Chris George wrote: > > Hi John, > > That makes no difference. >

Re: Cursor Position on Paste

2015-11-20 Thread john lunzer
Okay, thanks for testing it out. The behavior *does* work for me, so I'm not having an issue on my end. I'll try to take a look it at as soon as I can. Maybe not this weekend, but I'm off next week so should have some time. Edward or Terry, if you have any ideas on why it might now be working

Re: Cursor Position on Paste

2015-11-20 Thread lewis
I can confirm it makes no difference on a windows machine. The cursor always lands on the right with Global settings and @bool cursor_stay_on_paste = True in myLeoSettings.leo. Leo Log Window Leo 5.1-final, build 20151120111022, Fri Nov 20 11:10:22 CST 2015 Git repo info: branch = master,

Re: Cursor Position on Paste

2015-11-19 Thread john lunzer
After having just poked around in the copy and paste code and after implemented my own cursor position retention code for other (unreleased) features I think it wouldn't be too much of an issue. I personally don't see why it would be an issue, I think the current behavior exists because it is

Cursor Position on Paste

2015-11-18 Thread Chris George
I have a question. It would be useful to me to have the position of the cursor retained when copy/pasting text. For example: If I begin selecting a word/snippet of text from the left to the right and I paste it, the cursor remains at the end of the string. If I select from right to left and