Coder Social home page Coder Social logo

Comments (6)

bigfive avatar bigfive commented on June 15, 2024

Yeah its a shame about the lack of bufferPositionForPixelPosition(position)

At the moment I have to hijack the standard selection method in order to get rows and columns. That means I have to allow atom to do a normal selection and then override the selected ranges, which causes that horrible flickering and random selections appearing. Not ideal but the best I can do ATM

I'm not sure I know what you mean about the clicking and reseting cursors?

from atom-sublime-select.

iccir avatar iccir commented on June 15, 2024

I'm not @Egidius, but this is what I'm seeing:

Let's say I have this text in my editor:

 foo bar baz
 foo bar baz
|alpha beta gamma delta
 moo oink bah

With the cursor in front of alpha. I want to column select foo of the first two lines. I alt-click the top-left of the first foo, then drag to the bottom-right of the second foo.

I expect both foos to be selected, what I end up with is...

screen shot 2014-06-29 at 5 50 07 pm

from atom-sublime-select.

iccir avatar iccir commented on June 15, 2024

In Sublime, I end up with two cursors, at the end of both foo's, and both foos are properly selected.

from atom-sublime-select.

iccir avatar iccir commented on June 15, 2024

onMouseDown uses editor.getCursor().getBufferPosition() and assigns that to mouseStart, but in the above example, getBufferPosition() correlates to the beginning of alpha, not the beginning of foo (where I clicked). So you end up with mouseStart being the buffer coordinates of alpha and mouseStartPx being the pixel coordinates of foo

from atom-sublime-select.

bigfive avatar bigfive commented on June 15, 2024

Ah I see.
Ive recently updated to v1.0.2. Its a complete rewrite of the selection generation.
Ive written a 'screenPositionFromMouseEvent'. Let me know if that fixes the issues

from atom-sublime-select.

iccir avatar iccir commented on June 15, 2024

Nice! It seems to be working a lot better now! Thanks :)

from atom-sublime-select.

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.