Live data from Hacker News

Show HN: Lite – A small, fast text editor

github.com

21–30 of 276 posts

Re: Show HN: Lite – A small, fast text editor

#23

Looks nice. But upon starting it up I lost all windows decorations (KDE), had to restart my session and lost the things I was working on in my terminals. How can launching an app cripples the whole desktop ? (not that this have anything to do with the app to me, it's a plasma thing) First thing I look for was support for vim keybinding, could neovim be used as the backend editor ?

KDE disables compositing when SDL apps are opened to improve performance. It should return once the app is closed. You can disable this behavior in System Settings > Display and Monitor > Compositor and unchecking Allow applications to block compositing.

Re: Show HN: Lite – A small, fast text editor

#24
post #16

Earlier quoted context omitted.

on catalina os x; I just went git clone https://github.com/rxi/lite.git cd lite ./build.sh ./lite and an app did start up, but the text gets cut off in the editor window, and I can't quit the app from the menu

same here, works on mac quite nice :) and it's super fast. also fonts are a bit big on retina screen.

[deleted]

Re: Show HN: Lite – A small, fast text editor

#30
post #15

Earlier quoted context omitted.

on catalina os x; I just went git clone https://github.com/rxi/lite.git cd lite ./build.sh ./lite and an app did start up, but the text gets cut off in the editor window, and I can't quit the app from the menu

it seems to compile/run fine for me on catalina but everything is absolutely huge (hidpi compatibility issues?)

Same here; font is huge on catalina. It seems like this is the culprit:

  static double get_scale(void) {
          float dpi;
        SDL_GetDisplayDPI(0, NULL, &dpi, NULL);
  #if _WIN32
          return dpi / 96.0;
  #elif __APPLE__
          return dpi / 72.0;
  #else
          return 1.0;
  #endif
  }
I found changing it to dpi / 192.0 to be fairly comfortable. It wouldn't be too hard to add a scale option and change to `return (dpi * scale) / 192.0`. The "right way" is probably to do that but also get scale by checking the screen resolution; I'd go by height due to the increasing adoption of ultra-wide monitors:

  static double get_scale(void) {
          SDL_DisplayMode dm;
          SDL_GetDesktopDisplayMode(0, &dm);
          return dm.h * scale / 786.0;
  }
Edit: works on my win10 and arch boxes.
Post reply on HN