Bug 445898 - Terminal panel opens vi when I try to open a new file on another directory
Summary: Terminal panel opens vi when I try to open a new file on another directory
Status: RESOLVED WORKSFORME
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 21.08.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-22 07:03 UTC by juan
Modified: 2023-03-20 17:47 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Video of the behaviour observed (1.92 MB, video/mp4)
2022-01-25 02:51 UTC, juan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description juan 2021-11-22 07:03:18 UTC
SUMMARY
I'm using kate with the terminal plugin. If I have a file open, and I try to open another file on a different directory, either with the Filesystem Browser sidebar or  with File>Open, the terminal plugin opens a file on /tmp/ on vim. This happens with both input methods.

STEPS TO REPRODUCE
1. Open a file (example: ~/.bashrc)
2. Open the Terminal Panel
3. Open another file on a different directory (example: ~/.config/systemsettingsrc)

OBSERVED RESULT
The terminal panels opens a temporary file on vim

EXPECTED RESULT
The terminal remains unchanged, or the directory is chaged to the directory of the focused file.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2
Kernel Version: 5.15.2-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-3320M CPU @ 2.60GHz
Memory: 7.5 GiB of RAM
Graphics Processor: Mesa DRI Intel® HD Graphics 4000

ADDITIONAL INFORMATION
I tried removing vi and neovim, and now the terminal changes directory. This bug seems to only appear when vi is installed on the system.
Comment 1 Waqar Ahmed 2022-01-15 20:36:02 UTC
Can't reproduce. Can you provide some more details? How do you open the files? Detailed step by step instructions would be best.
Comment 2 juan 2022-01-25 02:51:11 UTC
Created attachment 145898 [details]
Video of the behaviour observed
Comment 3 juan 2022-01-25 02:52:49 UTC
Here's a video of the behaviour observed, the steps are:

1. Open a file on kate and open the Terminal Panel
2. Open another file on another directory, the Terminal Panel instead of cd on the directory will open VI on a temp file.
3. If vi is removed from the system, everything works fine.
Comment 4 Jyrki Gadinger 2022-03-06 21:23:05 UTC
Hi,

Kate sends ^E^U before the `cd /...` command to ensure the command line is empty.  Could it be that your shell is configured to open up vi on one of those keys?