GithubHelp home page GithubHelp logo

Comments (7)

tusharsnx avatar tusharsnx commented on May 26, 2024 2

If you have already introduced the throttled func, you still need to clear the search at the time of resize otherwise they render relative to the old buffer 🤔

from terminal.

tusharsnx avatar tusharsnx commented on May 26, 2024 1

Also, we don't really need to clear the highlights (and we should absolutely not because that's going to be announced as results being cleared 🤔). All we need is when there's a pending call to refresh the highlights, we should mark current results within Search to be not fresh. So, when the renderer tries to read in between the pending call, it should get an empty list for the duration. Later, the throttled call would refresh the results and mark them as fresh again.

from terminal.

lhecker avatar lhecker commented on May 26, 2024 1

[...] and we should absolutely not because that's going to be announced as results being cleared

BTW I've removed the event and replaced it with

  • An "output is idle" event, which gets thrown whenever there wasn't any output for 100ms
  • ControlCore::Search() returns a SearchResults struct

TermControl owns ControlCore and because of that IMHO the former should be in charge of deciding when to call into the latter. Whenever ControlCore raises this generic "output is idle" event, TermControl calls _core.Search() and handles updating the UI synchronously. That way no search update event is needed.

So, when the renderer tries to read in between the pending call, it should get an empty list for the duration. Later, the throttled call would refresh the results and mark them as fresh again.

I may be misunderstanding you again, but you're suggesting to clear the search results after the reflow and then trigger a search update asynchronously, right? That's the same thing I had in mind. 🙂

from terminal.

tusharsnx avatar tusharsnx commented on May 26, 2024

They shouldn't stick around after a resize

Does #16611 fix this for you?

from terminal.

lhecker avatar lhecker commented on May 26, 2024

I may be doing something wrong, but it seems to still occur.

from terminal.

lhecker avatar lhecker commented on May 26, 2024

BTW something funny is happening when I resize the app (this is a debug build so it's a little laggy):

96rPQXu7URrfxUdb.mp4

This is with my changes in to redo the search on resize, but I haven't touched the search code so I think it may have a bug.

from terminal.

lhecker avatar lhecker commented on May 26, 2024

OH.

from terminal.

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.