Git Product home page Git Product logo

Comments (23)

pintassilgo avatar pintassilgo commented on August 17, 2024 1

I did what he said.

  1. Open Cuda and disable Im if it's enabled.
  2. Close one tab.
  3. Open find bar and type something you know exists in the document you just closed.
  4. Reopen previous tab (I did it by pressing Ctrl+Shift+T).

Results: document will open and run find for the string you typed in findbar. This shouldn't happen. You only reopened the document, you didn't ask to run search.

from cudatext.

pintassilgo avatar pintassilgo commented on August 17, 2024 1

I was asked to not add any timers for Im option (by @pintassilgo ?)

Yes, it was me. The timer is bad (timers are rarely a good thing), no app with find-as-you-type have it, find is processed instantly.

Isn't O enabled by default? I believe it should be. Actually, I guess most apps don't even have the option to disable it.

Still talking about O, it's good to set "find_wrapped_blinking": "EdMarkedRangeBg", for visual feedback when search restarts from the beginning.

from cudatext.

Hexaae avatar Hexaae commented on August 17, 2024

Another issue:
IM mode OFF... when you search next/previous CT won't show the matches info (e.g. "found [1/12] matches...", until you switch to IM mode ON, and then return to IM mode OFF. From that moment on matches info will update correctly (f.e. you reach [3/12] etc...) even in IM mode OFF.

from cudatext.

Alexey-T avatar Alexey-T commented on August 17, 2024

Thanks for suggestions.
Hi @pintassilgo, can you give me 'steps' to reproduce issue-1 , please?

from cudatext.

Alexey-T avatar Alexey-T commented on August 17, 2024

Part-1 is fixed.

from cudatext.

Alexey-T avatar Alexey-T commented on August 17, 2024

Part-2: added timer which updates history, so it updates when about 1sec passes since last input.
@Hexaae tell me your string from About dialog, so I can give beta version.

from cudatext.

pintassilgo avatar pintassilgo commented on August 17, 2024

Suggestion for better part-2 fix: instead of using timer, treat by events and comparing find string with old value.

  • If user actively called find by Enter or > button (or < or |<) or by pressing F3 (or Shift+F3), update history.
  • If user removed focus from find input, update history.
  • When there's a input change event in find text, compare new string with previous string. If old string is a substring of the new value, do not update history (unless if one of the events above happened after the previous input change event).

from cudatext.

Alexey-T avatar Alexey-T commented on August 17, 2024

This way looks compicated, timer is much simpler and it works ok.

from cudatext.

Hexaae avatar Hexaae commented on August 17, 2024

Another issue: IM mode OFF... when you search next/previous CT won't show the matches info (e.g. "found [1/12] matches...", until you switch to IM mode ON, and then return to IM mode OFF. From that moment on matches info will update correctly (f.e. you reach [3/12] etc...) even in IM mode OFF.

What about this one? When IM is off at launch and you search for something repeated in the text, no "[2/12]" (just an example for 2nd occurrence found) gets displayed. You have to switch at least once IM on/off to make CT finally display it also with IM off.

from cudatext.

Alexey-T avatar Alexey-T commented on August 17, 2024

I think the culprit - who displayes the [N/M] - is the

  • Highlight Occurrences plugin with 'sel_allow':True option, or
  • 'Hi' find-option.

Pls check it.

from cudatext.

Alexey-T avatar Alexey-T commented on August 17, 2024

I am sure that [N/M] display is from the results of 'Hi' option marks. when marks visible - counter is here. so when counter is not here, maybe you did not use 'Hi'?

from cudatext.

Hexaae avatar Hexaae commented on August 17, 2024

"Hi" is selected:

image

Attached my settings:
user.json
default.json

Repro steps:
Im OFF, Hi ON at launch

  1. load a new text, f.e. from your file history
  2. CTRL+F "something" in the new file
  3. will find "something" but won't update [N/M]

... it's like CT forgets Hi is selected at launch + load new file, if you don't (re)select/deselect Hi or Im at least once...

from cudatext.

Hexaae avatar Hexaae commented on August 17, 2024

Part-2: added timer which updates history, so it updates when about 1sec passes since last input. @Hexaae tell me your string from About dialog, so I can give beta version.

CudaText 1.214.2.0, win64-x86_64-win32, fpc 3.2.3

from cudatext.

Alexey-T avatar Alexey-T commented on August 17, 2024

Seems I fixed it. let's test beta (win64 + linux qt5):
http://uvviewsoft.com/c/

( @pintassilgo too )

from cudatext.

pintassilgo avatar pintassilgo commented on August 17, 2024

In a quick test it looks fixed.

from cudatext.

Hexaae avatar Hexaae commented on August 17, 2024

All the 3 bugs are fixed πŸ‘πŸ»

from cudatext.

Hexaae avatar Hexaae commented on August 17, 2024

Just one more thing...
When you have Im ON, while you type it searches letter by letter and it asks you to restart search from the beginning before you typed in the full word you were looking for... Is it possible to add a small type-in delay there too, even if Im is selected?

from cudatext.

Alexey-T avatar Alexey-T commented on August 17, 2024

AFAIR, I was asked to not add any timers for Im option (by @pintassilgo ?). what you can do, is to check 'O' (wrapped) option to avoid messagebox.

from cudatext.

Hexaae avatar Hexaae commented on August 17, 2024

AFAIR, I was asked to not add any timers for Im option (by @pintassilgo ?). what you can do, is to check 'O' (wrapped) option to avoid messagebox.

Ok, 'O' workaround works, but if you can add maybe a general option (this will please everyone) for delay while typing in the Search bar would be great to me. Would be the best solution IMHO.

from cudatext.

Hexaae avatar Hexaae commented on August 17, 2024

Concept for a quick delay general option directly in the search bar... it could be like this:

image

from cudatext.

Alexey-T avatar Alexey-T commented on August 17, 2024

Isn't O enabled by default? I believe it should be.

changed default to On now.

from cudatext.

Alexey-T avatar Alexey-T commented on August 17, 2024

I dont like idea with new delay. one more timer, and one more option - not good. other apps don't have it. it will be another useless option.

from cudatext.

Hexaae avatar Hexaae commented on August 17, 2024

I dont like idea with new delay. one more timer, and one more option - not good. other apps don't have it. it will be another useless option.

Well, the idea is to remove other specific code for every single search mode... and adopt only a general delay or not option, quickly selectable from the search bar itself to please everyone for any situation. Sometimes could be handy having it removed altogether or enabled, your (quick) choice.

from cudatext.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.