Coder Social home page Coder Social logo

Comments (7)

dankamongmen avatar dankamongmen commented on June 10, 2024 1

Interesting. Cuz I used ncplane_putstr_yx() to print that multiline string to give the expected result of ncplane_puttext()

yeah, ncplane_putstr() will move to the next line, but it won't intelligently split lines so that words aren't broken across lines etc.

Edit: sorry, pressed the wrong button closing the commit

no worries! i definitely want to get this resolved either way.

from notcurses.

lokxii avatar lokxii commented on June 10, 2024

I can only tell that some calculations are wrong in this function to cause *bytes not being properly set, causing the do while loop in ncplane_puttext() to loop infinitely

from notcurses.

lokxii avatar lokxii commented on June 10, 2024

ncplane_puttext() can print text normally when I add one more 1 column wide character to the second line of the string. For example

    std::string text = "おなかがすいたし眠いのでナイトシティに帰ります\n私は最寄駅のことをナイトシティと22分前から呼んでいます";

from notcurses.

dankamongmen avatar dankamongmen commented on June 10, 2024

thanks for the report! i'll look into this as soon as i can, hopefully very soon.

from notcurses.

lokxii avatar lokxii commented on June 10, 2024

I replaced my use of ncplane_puttext() with ncplane_putstr_yx() because I only need to print align to left. Then I realized why do we need ncplane_puttext() when ncplane_putstr*() basically do all the jobs of ncplane_puttext()?

from notcurses.

dankamongmen avatar dankamongmen commented on June 10, 2024

I replaced my use of ncplane_puttext() with ncplane_putstr_yx() because I only need to print align to left. Then I realized why do we need ncplane_puttext() when ncplane_putstr*() basically do all the jobs of ncplane_puttext()?

ncplane_puttext() does way more than ncplane_putstr(). it's intended for putting multiple lines of text.

from notcurses.

lokxii avatar lokxii commented on June 10, 2024

Interesting. Cuz I used ncplane_putstr_yx() to print that multiline string to give the expected result of ncplane_puttext()

Edit: sorry, pressed the wrong button closing the commit

from notcurses.

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.