Really really strange behavior editing PowerFind Pro string

Everything related to our flagship word processor.
Post Reply
alanterra
Posts: 18
Joined: 2013-10-08 13:58:39

Really really strange behavior editing PowerFind Pro string

Post by alanterra » 2019-02-11 09:22:50

I have now seen this a few times -- deleting characters in the PowerFind Pro dialog box deletes characters after, or not adjacent, to the insertion caret. It is really weird!

System: MacOS 10.14.2, Nisus Writer Pro 3.0.1.

Set the search dialog to "PowerFind Pro (regex)" and put this string into the "Find what" field: (\d), (\d\d\d [mf])
Now try to put the insertion point between the space and the left parenthesis. I can't get the insertion point to actually go there, but instead it goes to the right of that left parenthesis.
Now type some delete characters. I can't attach a .mov in this forum, but here is a link: https://www.dropbox.com/s/90dh1wmbmwtb8 ... 1.mov?dl=0

Trust me, I am only typing delete characters in that movie.

This is just plain weird (but I am repeating myself).

martin
Official Nisus Person
Posts: 4586
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Really really strange behavior editing PowerFind Pro string

Post by martin » 2019-02-11 12:02:17

Your video is certainly very weird! I'm sure editing like that is totally impossible. That said, I haven't been able to reproduce the issue. Pasting your find expression (regex) into the Find window and editing it behaves normally for me. Are you able to reproduce the problem from scratch?

Also, is there any unusual formatting in your Find field? I'm thinking perhaps the fonts or spacing. I don't see anything exotic in your movie, but the formatting of the expression is certainly of interest. Normally the find field defaults to assuming the font/formatting of the target document, but that's not necessarily the case. The formatting of the find field can be completely separate, for example if you paste formatted text.

Thanks for your help in tracking this issue down!

User avatar
phspaelti
Posts: 1022
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Really really strange behavior editing PowerFind Pro string

Post by phspaelti » 2019-02-11 15:24:40

I can confirm that I have seen this behavior as well.
When this starts to happen, the cursor appears to be one character to the right of where the insertion point actually is. The only way to edit the find expression is to move the cursor with the cursor keys and keep the offset in mind.
I'm really not sure what triggers it.
philip

alanterra
Posts: 18
Joined: 2013-10-08 13:58:39

Re: Really really strange behavior editing PowerFind Pro string

Post by alanterra » 2019-02-11 17:59:36

Hi Martin

Yes, the issue is text styles in the find dialog.

Try the following. I show the result on my screen here:
https://www.dropbox.com/s/3ukdq1rqzl61b ... 2.mov?dl=0

Take the attached rtf document. It uses small caps, which may have something to do with this bug.

Open a text editor (I use text mate) and type in the string "(\d) (\d\d\d)" (I don't think it really matters)
Open the attached rtf document in NWP and select the word "text" and hit command-E to enter it into the find dialog
Hit command-F to open the find dialog, and hit backspace. This should, but appears to not, clear all formatting in the find dialog.
Go to your text editor, copy the string, and then paste it into the Nisus find dialog
Click on the string in the find dialog and hit some backspaces.

For me, I get weird behavior. Not as weird as I showed you the first time, but still strange.
Attachments
test doc.rtf
(20.09 KiB) Downloaded 122 times

User avatar
phspaelti
Posts: 1022
Joined: 2007-02-07 00:58:12
Location: Japan

Re: Really really strange behavior editing PowerFind Pro string

Post by phspaelti » 2019-02-11 19:44:36

I'd like to reconfirm that I know this problem, and have seen it many times, though not recently. When it starts, it is very annoying, and it's not possible to get rid of it easily. It is very confusing, but ultimately simple: the insertion point in the Find dialog is "off by 1". This makes it very difficult to edit the expression in the find box, as backspace never deletes the expected character.

I did try Alan's instructions, but they do no trigger the problem for me. The one variable from his instructions which I agree may somehow be relevant is the "Copy to Find" command. But I don't think the specific style/attributes (Small Caps) or the find expression, or the copying in from another text editor are in any way relevant.

Also, in my experience, it is not limited to PowerFind Pro, but can happen in PowerFind as well. (At least that's what I remember).

Anyhow, that's my experience, FWIW.
philip

adryan
Posts: 305
Joined: 2014-02-08 12:57:03
Location: Australia

Re: Really really strange behavior editing PowerFind Pro string

Post by adryan » 2019-02-11 20:16:39

G’day, Philip et al

We have encountered a variant of this problem before:–

https://nisus.com/forum/viewtopic.php?f=18&t=7256

At the time, Philip, you suggested (for another reason) altering the zoom in the Find/Replace dialog box, and this fixed the problem for me.

But there seems to be a bug in F/R that allows this annoying behavior to occur in the first place.

Cheers,
Adrian
MacBook Pro (mid-2014)
macOS Mojave 10.14.6
Nisus Writer user since 1996

alanterra
Posts: 18
Joined: 2013-10-08 13:58:39

Re: Really really strange behavior editing PowerFind Pro string

Post by alanterra » 2019-02-11 20:42:21

I have no idea what is meant by altering the zoom in the Find/Replace Dialog. Is there a link that went sour in the original posting?
phspaelti wrote:
2018-10-25 06:25:01
Hi Adrian,
I just know that I have seen this problem off and on, including once in NW3. Currently it seems to be okay.
As for the Find Box text size: I set the Zoom of the Find Box to 300%, which solves the "too small" problem for me.
In any event, I resized the Find/Replace dialog, and the issue went away, as far as I can tell. Whatever the problem is, the recipe I gave above probably doesn't help.

Can anyone show me how to change the zoom of the Find/Replace dialog?, I can't find any reference to this.

TIA

[Looking through the manual, I see that "zoom" is used to refer to the size of the Find/Replace dialog, not the magnification. If that is what is meant by "zoom of the Find box," never mind, I know how to do that, and, yes it does seem to fix the problem.]

adryan
Posts: 305
Joined: 2014-02-08 12:57:03
Location: Australia

Re: Really really strange behavior editing PowerFind Pro string

Post by adryan » 2019-02-11 22:04:59

G’day, alanterra et al

I’m not sure there was a link in that earlier posting, so I’m not sure why the underlining occurs there now.

Anyway, as I recall, the idea (thanks to Philip) is to use View > Zoom when the Find & Replace dialog box is the active window.

Cheers,
Adrian
MacBook Pro (mid-2014)
macOS Mojave 10.14.6
Nisus Writer user since 1996

martin
Official Nisus Person
Posts: 4586
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Really really strange behavior editing PowerFind Pro string

Post by martin » 2019-02-12 11:17:38

Thanks for posting instructions on how to reproduce the bug alanterra, but just like Philip I could not trigger the problem. It sounds like you can reliably trigger the bug any time. Is that true even if you quit and relaunch Nisus Writer? If so we might be able to work with you privately, using a debug version of the app, to try to narrow this down. Please let us know.

Oh and aside from using the menu View > Zoom to adjust the zoom in the Find dialog, you can also use whatever keyboard shortcuts you've established. I often use the zoom in/out keyboard shortcuts in the Find panel to quickly control the text size.

alanterra
Posts: 18
Joined: 2013-10-08 13:58:39

Re: Really really strange behavior editing PowerFind Pro string

Post by alanterra » 2019-02-12 11:21:59

Hi Martin

The bug has disappeared for me, sorry, so not worthwhile doing anything at this point. If it recurs, and if I can reliably cause it to happen, I'll let you know. Now I see that zoom entry, it's very useful. Judging from my results and others, zooming probably fixes the bug, perhaps (I hope) permanently.

A

martin
Official Nisus Person
Posts: 4586
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Really really strange behavior editing PowerFind Pro string

Post by martin » 2019-02-12 11:29:11

I'm glad you've excised the bug, though it's a pity we couldn't track this issue down. Thanks all the same for your efforts!

If anyone does hit upon a way to reliably trigger this problem, please let us know so we can continue to investigate.

martin
Official Nisus Person
Posts: 4586
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: Really really strange behavior editing PowerFind Pro string

Post by martin » 2019-06-27 08:03:27

This problem with an incorrectly positioned/drawn selection caret in the find/replace panel should be fixed in Nisus Writer Pro 3.0.2.

At least the one particular bug we discovered is now fixed. Since we never had an exact set of instructions on how to reproduce the original bug, we can't say for certain if it too is fixed. However, I estimate there's a high likelihood that the bugs were the same and this problem is now fixed completely. If anyone sees the bug again in version 3.0.2 please let us know.

Post Reply