Describe the bug
Trying to open some file in vim from different directory than the "initial", from which inshellisense has been run, generates TypeError and inshellisense crashes. The log is below:
file:///home/whiskeyo/inshellisense/build/isterm/commandManager.js:195
for (let i = globalCursorPosition; i < this.#activeCommand.promptEndMarker.line + maxPromptPollDistance; i++) {
^
TypeError: Cannot read properties of undefined (reading 'line')
at CommandManager.termSync (file:///home/whiskeyo/inshellisense/build/isterm/commandManager.js:195:88)
at file:///home/whiskeyo/inshellisense/build/isterm/pty.js:54:38
at n._innerWrite (/home/whiskeyo/inshellisense/node_modules/xterm-headless/lib-headless/xterm-headless.js:1:93524)
at Timeout._onTimeout (/home/whiskeyo/inshellisense/node_modules/xterm-headless/lib-headless/xterm-headless.js:1:93035)
at listOnTimeout (node:internal/timers:569:17)
at process.processTimers (node:internal/timers:512:7)
To Reproduce
Steps to reproduce the behavior:
Go to home directory (or any other), create directory example (optional: and inside create a file something.txt)
Run inshellisense inside the home directory
Change directory to example
Try to run vim something.txt
Error from the description appears and inshellisense crashes (is -c returns "session not found")
Feel free to use these commands to reproduce it quicker:
cd ~ && mkdir example && touch example/somefile.txt
is -s bash
cd example
vim somefile.txt
# when I used: cd example && vim somefile.txt it did not show an error, this is strange :)
Expected behavior
All apps should open normally and inshellisense should not crash
Environment
OS: Windows 11, running Debian in WSL2
Output of is --version: 0.0.1-rc.9, running on 9e7bef8e42eb36c7aaeb8a8f34175ac4202c2ad8
Nodejs Version: v18.19.0
Shell: bash + oh-my-bash (tested also without oh-my-bash, result is the same)
Describe the bug Trying to open some file in
vim
from different directory than the "initial", from which inshellisense has been run, generatesTypeError
and inshellisense crashes. The log is below:To Reproduce Steps to reproduce the behavior:
example
(optional: and inside create a filesomething.txt
)example
vim something.txt
is -c
returns "session not found")Feel free to use these commands to reproduce it quicker:
Expected behavior All apps should open normally and inshellisense should not crash
Environment
is --version
: 0.0.1-rc.9, running on 9e7bef8e42eb36c7aaeb8a8f34175ac4202c2ad8Additional context If you have some questions, I'll try to answer ASAP. Here you can find a short video with the problem: https://www.youtube.com/watch?v=PSVm_k_zGsw