boysetsfrog/vimpc

Ncurses glitch on startup

Opened this issue · 4 comments

If I start vimpc like urxvt -e vimpc or st -e vimpc (it's useful if I want to use a hotkey to start vimpc) I get something like this every time:

screenshot-2021-01-03_164711

If I start terminal first, and then start vimpc, everything is ok.
The WM is i3 if it matters, and the default layout is "tabbed" (new windows start maximized).

I'm not very familiar with ncurses, but I've made a (crude) fix which works fine for me:

diff --git a/src/vimpc.cpp b/src/vimpc.cpp
index 8754281..829e8c0 100644
--- a/src/vimpc.cpp
+++ b/src/vimpc.cpp
@@ -239,6 +239,8 @@ void Vimpc::Run(std::string hostname, uint16_t port)
          if (((input != ERR) || (Resize == true)) || (requireRepaint_ == true))
          {
             QueueMutex.unlock();
+            endwin();
+            refresh();
             Repaint();
          }
          else

WDYT?

P.S. I don't have such glitches with other ncurses programs. mutt, irssi, htop, mc work fine if I start them like that.

I'm not able to recreate this on my machine with urxvt -e vimpc. Your local system or urxvt settings may be involved. Are you still having the issue? Are you in the playlist window (I can't tell from screenshot)?