Coder Social home page Coder Social logo

Comments (6)

zeertzjq avatar zeertzjq commented on May 27, 2024

Related #4687

from vim.

girishji avatar girishji commented on May 27, 2024

Related #4687

It appears that is a different issue, related to supporting string as substitute (instead of single character).

The issue I reported is a bug. Column numbers (based on byte count) should not change when some character is concealed or substituted. What happens on screen (how many cells a character occupies) should not affect byte position in a string/line.

from vim.

zeertzjq avatar zeertzjq commented on May 27, 2024

I don't think byte position is wrong. If you press ga you can see that the cursor is actually on the n after using cursor(1, 12), not the i.

from vim.

girishji avatar girishji commented on May 27, 2024

I don't think byte position is wrong. If you press ga you can see that the cursor is actually on the n after using cursor(1, 12), not the i.

Good point, but the cursor (visual character on screen) is still on i. So there is a mismatch between where the cursor is visually on the screen vs what Vim thinks (according to ga). Now try to open a popup window at n (using what wincol() reports), it would be incorrectly shifted one cell to the left because of this mismatch.

You can also move the cursor to the right (across the hidden character) and watch column numbers increment on the ruler. They'd be wrong too.

from vim.

girishji avatar girishji commented on May 27, 2024

Searching for a string also shows the bug. Say the cursor is on A, and If you search /nn, the cursor lands on in (of beg|in|ning) instead of nn. Line is set as At the beばinninば .

This bug is probably not of much interest since the scenario of substituting single-cell wide char with double-wide char is unlikely. Maybe of importance to non-English users.

from vim.

ronin49 avatar ronin49 commented on May 27, 2024

@girishji
i think we will not do it
conceal is just a graphic thing so all vim's mechanics don't care about it
those vim doesn't see what you see using conceal

from vim.

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.