RMichelsen / Nvy

Nvy - A Neovim client in C++
MIT License
333 stars 28 forks source link

Selection shifts the rendering grid #134

Open jpt13653903 opened 3 weeks ago

jpt13653903 commented 3 weeks ago

I have the following setup:

When I select lines, the renderer looses pixel-alignment. You can see this on the right-hand screen's fold indicators:

image

image

jpt13653903 commented 2 weeks ago

@RMichelsen

I'd like to take a stab at fixing this myself, but I'm having trouble with the build chain...

My cmake output is:

PS C:\jpt\GitHub\nvy\build> cmake .. -GNinja
-- The C compiler identification is MSVC 19.41.34123.0
-- The CXX compiler identification is MSVC 19.41.34123.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.41.34120/bin/Hostx86/x86/cl.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: C:/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/VC/Tools/MSVC/14.41.34120/bin/Hostx86/x86/cl.exe - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Git: C:/Program Files/Git/cmd/git.exe (found version "2.42.0.windows.2")
-- Configuring done (1.0s)
-- Generating done (0.0s)
-- Build files have been written to: C:/JPT/GitHub/Nvy/build

And ninja outputs:

PS C:\jpt\GitHub\nvy\build> ninja
[5/9] Building CXX object CMakeFiles\Nvy.dir\src\renderer\glyph_renderer.cpp.obj
FAILED: CMakeFiles/Nvy.dir/src/renderer/glyph_renderer.cpp.obj
C:\PROGRA~2\MICROS~3\2022\BUILDT~1\VC\Tools\MSVC\1441~1.341\bin\Hostx86\x86\cl.exe  /nologo /TP -DMPACK_EXTENSIONS -DUNICODE -IC:\JPT\GitHub\Nvy\src /DWIN32 /D_WINDOWS /GR- /EHs-c- /Zi /Ob0 /Od /RTC1 -std:c++20 -MDd /YuC:/JPT/GitHub/Nvy/build/CMakeFiles/Nvy.dir/cmake_pch.hxx /FpC:/JPT/GitHub/Nvy/build/CMakeFiles/Nvy.dir/./cmake_pch.cxx.pch /FIC:/JPT/GitHub/Nvy/build/CMakeFiles/Nvy.dir/cmake_pch.hxx /showIncludes /FoCMakeFiles\Nvy.dir\src\renderer\glyph_renderer.cpp.obj /FdCMakeFiles\Nvy.dir\ /FS -c C:\JPT\GitHub\Nvy\src\renderer\glyph_renderer.cpp
C:\JPT\GitHub\Nvy\src\renderer\glyph_renderer.h(9): error C2695: 'GlyphDrawingEffect::AddRef': overriding virtual function differs from 'IUnknown::AddRef' only by calling convention
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\um\unknwnbase.h(125): note: see declaration of 'IUnknown::AddRef'
C:\JPT\GitHub\Nvy\src\renderer\glyph_renderer.h(13): error C2695: 'GlyphDrawingEffect::Release': overriding virtual function differs from 'IUnknown::Release' only by calling convention
C:\Program Files (x86)\Windows Kits\10\include\10.0.26100.0\um\unknwnbase.h(127): note: see declaration of 'IUnknown::Release'
.
.
.
.

Any advice?

jpt13653903 commented 2 weeks ago

Never mind -- I added STDMETHODCALLTYPE to everything and now it builds.

The next problem is that it crashes the moment I try to run my build. I'm suspecting a library version issue that I'm not going to try and solve.

I've switched over to using PowerShell as my Neovim GUI -- didn't realise that it's actually decent before trying it out accidentally today while trying to debug my build issues...