Thank you Gaurami, 🦁 And thanks to all who has commented here about *shifts in the text selection range being detected in vscode, and given to Leo prior to executing a command*. (in this instance, 'extract', but it could also apply to other commands such as execute script Ctrl+B, and others)
So another check you might wanna do and report here is , lets say you have body text consisting of this: g.es('1') g.es('2') g.es('3') g.es('4') ... and so on You could try to rapidly select a random chunk of lines and see if CTRL+B runs those lines (although it's different than extract, as extract doesn't care where the exact selection starts or ends precisely on which character on a line, it just cares about if a line is in or out. I'll create an issue and setup experiments to figure out how to correct the detection of the selected text range and its setup in Leo. (There is also a conversion algorithm applied in between because on one side it's just a string position, and on the other it's a row and col duo.) So there's a couple places things can go wrong. 'Thought I'd fix it for good the last time I made this part of leointeg/leoserver but looks like Gaurami got me good :) -- Félix p.s. another test people could try to do and report here is : do a find-text (ctrl+f) with a long chunk of text... Does leoInteg correctly selects the text in the body pane? if it'S always correct that means the bug in translation of the selected text range is only on one-way (from leointeg to leoserver) On Thursday, August 26, 2021 at 9:34:12 AM UTC-4 tbp1...@gmail.com wrote: > I could not repro this exactly, but the result was not quite right, > either. Using the same steps, I got a new node with the expected headline > *func > ctorFromLogical*. The body of the function did not contain the extra > fragment line at the bottom, but it also did not contain the first line > *func > ctorFromLogical* as it should have. > > Leo 6.4b2, 6.4 branch, build ee0a3334b4 > 2021-08-16 04:32:32 -0500 > Python 3.9.5, PyQt version 5.15.2 > Windows 10 AMD64 (build 10.0.19043) > > > On Thursday, August 26, 2021 at 6:13:25 AM UTC-4 Edward K. Ream wrote: > >> On Thu, Aug 26, 2021 at 1:50 AM Alexey Tikhonov <tickli...@gmail.com> >> wrote: >> >> There is a strange thing with the command "extract", which often (but not >>> always) happens: >> >> >> Thanks for this excellent testing. leoserver.py does not contain any >> special code for the "extract" command, so this may be a bug in Leo. >> >> I wonder whether the preceding "@others" line has anything to do with the >> problem. >> >> Edward >> > -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to leo-editor+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/5580466f-3f30-4838-94d2-5a69aba31cc5n%40googlegroups.com.