onivim / oni

Oni: Modern Modal Editing - powered by Neovim
https://www.onivim.io
MIT License
11.35k stars 301 forks source link

Changing themes is buggy #2470

Open ecesar88 opened 6 years ago

ecesar88 commented 6 years ago

Oni Version: 0.3.6 Neovim Version (Linux only): Operating System: Microsoft Windows 10 x64 v1709, build nΒΊ16299.15

Issue: Changing themes is buggy and laggy it slows Oni down so much.

Expected behavior: Like in VSCode or Atom, when i select a theme, it instantaneously changes the actual theme to the new i selected. In Oni, this doesn't happen.

Actual behavior: It takes so much to change between themes, when i select one in the command palette, the screen flashes and the theme starts to load slowly. After about 5-10 seconds i can use Oni normally again.

Steps to reproduce: Just open up the command palette and select Themes => Choose theme and select any theme from the list.

I understand that this is still an experimental / beta version, but even with all the bugs, the development team is to be congratulated! It really is a beautiful job! Thank you :) πŸ‘

oni-bot[bot] commented 6 years ago

Hello and welcome to the Oni repository! Thanks for opening your first issue here. To help us out, please make sure to include as much detail as possible - including screenshots and logs, if possible.

akinsho commented 6 years ago

I've had a quick look into this and it seems possibly straight forward to fix the relevant file is https://github.com/onivim/oni/blob/master/browser/src/Services/Themes/ThemePicker.ts I found that removing this clause partially fixes the issue but havent had time for more investigation as it is not a complete fix

ecesar88 commented 6 years ago

Glad to know it is an easy thing to fix. Thanks for the support :D

koutselakismanos commented 6 years ago

Can i take it?

akinsho commented 6 years ago

@koutselakismanos that would be fantastic πŸŽ‰ let me know if you need any help

koutselakismanos commented 6 years ago

@Akin909 What are you suggesting that should be done? When using x mode :colorscheme gruvbox or :colorscheme node it works properly, i tried checking if there is a problem when configuration.setValues({ "ui.colorscheme": newOption.label }) or when themeManager.setTheme(newOption.label) but i can't seem to find the problem.

CrossR commented 6 years ago

I think the problem @koutselakismanos is in the command pallete theme switcher.

That is, Ctrl-Shift-P (cmd-shift-p on mac) and then select the theme changer. You can swap themes there, and highlighting a different theme will swap to that theme, but seems to cause some flickering and other issues where the theme doesn't swap and more.

koutselakismanos commented 6 years ago

@CrossR I meant i can't seem to find the solution, i have managed to fix the problem but not completely, there is still some flickering but only if you change themes really fast. I will keep trying to solve the problem.