Giter Club home page Giter Club logo

Comments (5)

hismailbulut avatar hismailbulut commented on May 19, 2024 1

Is it possible to use the default font and give an error? like the pr😄

😂

Actually pr is good but the problem is not using the default font, it's not our fault either.. We must give an error to the user while the Neoray is not launched with nofork and there is only way to do it, show an error message in neovim (actually not only way, we can show a system error dialog). User should know their font is not found by Neoray with this name. Also setting kit to nil is unnecessary here because the kit is already nil and font system will use default font while it is nil. There is no problem with that. Only problem here is neovim does not give a promise us the cursor position will be in the grid area. We can't assert that. The simplest solution is adding a SafeCellAt function to grid and check for bounds and return an empty cell if it out of bounds. Also I liked the system dialog idea (I thought of it while writing this). It will be safer than calling neovim api for showing error message because neovim sometimes does not write this echoerr/msg calls (this is also is not our problem and we can't fix this)
I'm also curious about your opinions

from neoray.

tianyax avatar tianyax commented on May 19, 2024 1

Is it possible to use the default font and give an error? like the pr😄

😂

Actually pr is good but the problem is not using the default font, it's not our fault either.. We must give an error to the user while the Neoray is not launched with nofork and there is only way to do it, show an error message in neovim (actually not only way, we can show a system error dialog). User should know their font is not found by Neoray with this name. Also setting kit to nil is unnecessary here because the kit is already nil and font system will use default font while it is nil. There is no problem with that. Only problem here is neovim does not give a promise us the cursor position will be in the grid area. We can't assert that. The simplest solution is adding a SafeCellAt function to grid and check for bounds and return an empty cell if it out of bounds. Also I liked the system dialog idea (I thought of it while writing this). It will be safer than calling neovim api for showing error message because neovim sometimes does not write this echoerr/msg calls (this is also is not our problem and we can't fix this) I'm also curious about your opinions

giving the user an error message is indeed a good interactive experience

from neoray.

hismailbulut avatar hismailbulut commented on May 19, 2024

Thanks TianYaX for both issue and pr. But pr does not fix the issue but hides it. Please try the 7ec4f6c

from neoray.

tianyax avatar tianyax commented on May 19, 2024

I tried to apply this commit(7ec4f6c) but it doesn't seem to work...

from neoray.

tianyax avatar tianyax commented on May 19, 2024

Is it possible to use the default font and give an error? like the pr😄

from neoray.

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.