Closed ajrilatt closed 10 months ago
Ah, looks like a new error in nim 2.0. I fixed it, so do nimble install paravim
to get the latest and then try building vim cubed again.
Thanks for the update & for coming back to the project so quickly. After a fresh nimble install paravim
, I can build without any errors!
vim3 will display a file if provided as an argument, but if I attempt to move my cursor, or run a command, or make an edit, it immediately crashes.
Trace:
C:\Users\<...>\vim_cubed\src\vim3.nim(55) vim3
C:\Users\<...>\vim_cubed\src\vim3.nim(10) keyCallback
C:\Users\<...>\.nimble\pkgs2\paravim-0.18.5-d616da6f86da2ff0399d7e477eec2f703828be78\paravim.nim(59) keyCallback
C:\Users\<...>\.nimble\pkgs2\paravim-0.18.5-d616da6f86da2ff0399d7e477eec2f703828be78\paravim\vim.nim(124) onInput
C:\Users\<...>\.nimble\pkgs2\paravim-0.18.5-d616da6f86da2ff0399d7e477eec2f703828be78\paravim\vim.nim(103) updateAfterInput
C:\Users\<...>\.nimble\pkgs2\paravim-0.18.5-d616da6f86da2ff0399d7e477eec2f703828be78\paravim\vim.nim(85) updateSearchHighlights
C:\Users\<...>\nim-2.0.0\lib\system\fatal.nim(53) sysFatal
Error: unhandled exception: value out of range: 1 notin -2147483648 .. 2147483647 [RangeDefect]
1 notin -2147483648 .. 2147483647
is strange, that evaluates to true when tested in a codepen. Seems like a mismatch in datatypes. Did nim 2.0 add more type checking?
That is pretty weird...it doesn't happen to me but i don't have a windows machine to test with at the moment. If you have WSL installed it might be worth checking how it behaves from there.
I set up WSL, grabbed the xorg development packages, reinstalled Nim, pulled down this repo again, and was able to compile everything without errors. vim3 now functions as normal (if "normal" can even be used to describe it!). The X11 emulation is definitely slower than it was on Windows, but that's a small price to pay for editing a file in three dimensions.
Thanks again for coming back to this project and rolling out a patch so quickly. It's a very fun editor.
I'm running Windows 11. This is my first interaction with Nim. Installed Nim 2.0.0:
When running
nimble run vim3
from the project directory, I get:I don't see anything wrong with
paravim.nim
. Line 135 is the last line, which is where the build error is tripping.Any advice is appreciated.