Git Product home page Git Product logo

Comments (6)

t9md avatar t9md commented on June 15, 2024 1

OK, thanks, maybe release at tomorrow.
Thanks for checking how it works, was great help 👍

from atom-cursor-history.

t9md avatar t9md commented on June 15, 2024

I checked and now understand why it's not work.
I'm not hyperclick user currently.

I'll back when I'm motivated to support hyperclick.
Here is memo what I investigated very quickly.

  • What cursor-history package doing on normal mouse click event is( normal mouse click just move cuursor to clicked position )

    • Save location(filePath and cursor position) on mouse-event capture phase(at this point cursor is still at old position)
    • Compare location after 100ms of mouse-event bubbling phase(at this point, cursor is at new position)
    • Comparison is done by diff of row, diff of filePath, diff of cursor column within same row(optional).
    • Then comparison result met criteria to save to history, update history.
  • But when hyperclick click, it won't fire 2nd mouse-event bubbling phase, in other word, hyperclick intentionally prevent propagation of mouse event. So cursor-history have no chance to know the timing to compare with old and new locaiton.

  • The fix idea is to start observation of cursor position change on captureing phase of click.

  • Then cursor position was changed, compare location(filePath, position).

  • I'm intentionally basically avoiding to use editor.onDidChangeCursorPosition

  • I used in old code of this package, but removed to avoid mis-memorizing history because of so many package update cursor position with intent or without intent, that mess up history(means save useless cursor position, e.g just cmd-r to refer symbols-view update cursor position and update history if I natively use onDidChangeCursorPosition).

Will back when I have time, thanks for input!

from atom-cursor-history.

aki77 avatar aki77 commented on June 15, 2024

Thank you for your help. 😄
I can wait.

from atom-cursor-history.

t9md avatar t9md commented on June 15, 2024

I haven't checked throughly, do you have time to check the behavior from this repo?

CHANGES from released version are

  • history serialize/deserialization with normal Atom's serialization mechanism(thus history is maintained per project not per Atom-wide)
  • hyperclick support( open new file via mouse and mouse event is not propagated situation )

from atom-cursor-history.

aki77 avatar aki77 commented on June 15, 2024

Noted with thanks!

from atom-cursor-history.

aki77 avatar aki77 commented on June 15, 2024

It's a perfect! Thank you. 👍

from atom-cursor-history.

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.