Giter Club home page Giter Club logo

Comments (10)

rhysd avatar rhysd commented on June 19, 2024

Thank you for the report. I could reproduce it.

  1. Open Vim with Crystal code
  2. Move to end with G.
  3. :vsplit
  4. :CrystalFormat

This is because vim-crystal replaces whole current buffer as below:

  1. Get whole current buffer
  2. Format by crystal tool format
  3. Remove entire current buffer
  4. Paste formatted code

I must preserve the cursor positions of all buffers.

from vim-crystal.

rhysd avatar rhysd commented on June 19, 2024

@will

This issue is fixed at least in my environment.
Could you also check it?

from vim-crystal.

will avatar will commented on June 19, 2024

Thanks for looking at this. I can't check for a day or so, but will as soon as I can.

from vim-crystal.

rhysd avatar rhysd commented on June 19, 2024

It's OK when you have a time to check.

from vim-crystal.

will avatar will commented on June 19, 2024

Sorry for taking so long, it's a little better thank you, but still the other pane moves on longer files

:e spec/pg/connection_spec.cr
:sp

move so top split starts at line 14, ends at 43, and cursor is on 40
move so bottom split start at line 75, ends at 104, and cursor on 105
:w on bottom split

bottom split stays put, but top split moves so is top at line 1 and bottom at line 30. When I move to the top split, the split moves so the cursor is still on line 40, by making the top line 11 and the bottom 40.

from vim-crystal.

rhysd avatar rhysd commented on June 19, 2024

Ah, OK, I'll check it later. Thank you for the detail.

from vim-crystal.

rhysd avatar rhysd commented on June 19, 2024

Sorry for making you wait. I tried. It seems that cursor position is preserved but the screen position is not...
I'll try to fix it.

from vim-crystal.

rhysd avatar rhysd commented on June 19, 2024

@will

At aebaadb, I confirmed that screen position is also fixed. Could you check it?

from vim-crystal.

will avatar will commented on June 19, 2024

Great! thank you!

from vim-crystal.

rhysd avatar rhysd commented on June 19, 2024

👍

from vim-crystal.

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.