The new Find Dialog is complete

63 weergaven
Naar het eerste ongelezen bericht

Edward K. Ream

ongelezen,
19 jun 2015, 20:25:1619-06-2015
aan leo-e...@googlegroups.com
Afaik, the Find Dialog now works as well as, or better than, the Find Tab.

Please report any problems immediately.  I plan no other work on the project except to fix bugs.

Recent revs fix several glitches:

1. Most standard key bindings are available in the Find Dialog.  This includes all find-related commands, and general bindings such as Ctrl-S.

2.  Added support for @bool close-find-dialog-after-search = True.

The default is True, to match Scite, for example.

True: closes (hides) the dialog after any search, successful or not.

False: leave the dialog open, but behind the main window, after any search.

Edward 

P.S. I recommend minibuffer-find mode for experts.  Enable with @bool minibuffer_find_mode = True.

This mode has been improved recently.  It no longer shows the Find Tab at all!  Instead, the minibuffer shows the search and change strings (use tab to select the change string) and the status line temporarily shows the status of radio buttons and check boxes.  Not futzing with Find Tab sizing is a big plus.

EKR

john lunzer

ongelezen,
20 jun 2015, 09:43:5820-06-2015
aan leo-e...@googlegroups.com
The new minibuffer_find_mode sounds like a huge improvement! I always wanted the find and replace strings both on the minibuffer. 

Edward K. Ream

ongelezen,
20 jun 2015, 11:36:3520-06-2015
aan leo-editor
On Sat, Jun 20, 2015 at 8:43 AM, john lunzer <lun...@gmail.com> wrote:
The new minibuffer_find_mode sounds like a huge improvement! I always wanted the find and replace strings both on the minibuffer. 

​Try it.  I think you'll like it.

EKR

john lunzer

ongelezen,
20 jun 2015, 13:58:2820-06-2015
aan leo-e...@googlegroups.com
I'm getting weirdness when trying to use minibuffer replace, first if nothing is selected it tells me "no text selected", if I have text selected sometimes it just deletes the selected text and sometimes I see this:

exception executing command

Traceback (most recent call last):

File "C:\Users\L\Documents\sourcetreeapp\leo-editor\leo\core\leoCommands.py", line 5496, in doCommand

val = command(event)

File "C:\Users\L\Documents\sourcetreeapp\leo-editor\leo\core\leoGlobals.py", line 1334, in wrapper

func(self, event=event)

File "C:\Users\L\Documents\sourcetreeapp\leo-editor\leo\core\leoFind.py", line 1121, in change

self.changeSelection()

File "C:\Users\L\Documents\sourcetreeapp\leo-editor\leo\core\leoFind.py", line 1194, in changeSelection

c.frame.tree.drawIcon(p) # redraw only the icon.

File "C:\Users\L\Documents\sourcetreeapp\leo-editor\leo\plugins\qt_tree.py", line 709, in drawIcon

itemOrTree = self.position2item(p) or w

File "C:\Users\L\Documents\sourcetreeapp\leo-editor\leo\plugins\qt_tree.py", line 847, in position2item

item = self.position2itemDict.get(p.key())

AttributeError: 'NoneType' object has no attribute 'key' 

john lunzer

ongelezen,
20 jun 2015, 14:00:1820-06-2015
aan leo-e...@googlegroups.com
The full trace in the console window is HUGE, but if you need it I can give it to you. Also just to confirm I'm on commit 82edcda7fd6c on windows 7, python 2.7.8

Edward K. Ream

ongelezen,
20 jun 2015, 17:59:1220-06-2015
aan leo-editor
On Sat, Jun 20, 2015 at 12:58 PM, john lunzer <lun...@gmail.com> wrote:
I'm getting weirdness when trying to use minibuffer replace, first if nothing is selected it tells me "no text selected", if I have text selected sometimes it just deletes the selected text and sometimes I see this:

​Thanks for this report.  I use the minibuffer find exclusively, except when testing other kinds of finds, and have never seen a problem.  Odd.  I'll look into it.

Edward

Edward K. Ream

ongelezen,
22 jun 2015, 14:06:5022-06-2015
aan leo-e...@googlegroups.com, lun...@gmail.com


On Saturday, June 20, 2015 at 12:58:28 PM UTC-5, john lunzer wrote:
I'm getting weirdness when trying to use minibuffer replace, first if nothing is selected it tells me "no text selected", if I have text selected sometimes it just deletes the selected text and sometimes I see this:

exception executing command


[snip]

File "...leo\core\leoFind.py", line 1194, in changeSelection

c.frame.tree.drawIcon(p) # redraw only the icon.

[snip]


Nice catch.  Fixed at rev c7e62c2.


The fix was to have changeSelection init p = self.p or c.p, which will surely solve the specific problem.  The logic that sets self.p is hairy, so it's best not to mess with it ;-)


A later rev changes c.p.copy() to c.p throughout.  c.p is a property which always returns a fresh copy of a position.


EKR

john lunzer

ongelezen,
22 jun 2015, 15:44:2922-06-2015
aan leo-e...@googlegroups.com, lun...@gmail.com
awesome, I'll check it out.

john lunzer

ongelezen,
23 jun 2015, 07:40:5323-06-2015
aan leo-e...@googlegroups.com
I'm still getting 'no text selected' for Search --> Replace. Upon selecting text and executing Replace I am no longer receiving the error but it is still deleting the selected text.

Upon further investigation I now understand why this is. I completely missed (and misunderstood) that when you press Ctrl + F and type in your search string you need to press Tab to then execute set-replace-string command which in this context does no actual replacing but finds and highlights the next instance of the find string. I then have to execute replace in order to actually replace the selected text. Executing replace-all does not have any effect (I would expect it to execute replace on all the instances of the search string with my set replace string). I can sometimes get all instances to be replaced if I re-execute set-replace-string manually from the minibuffer but the context in which this is successful is not clear to me.

If 'replace-all' replaced the set search/replace pair then this would be useful. 
Allen beantwoorden
Auteur beantwoorden
Doorsturen
0 nieuwe berichten