When starting kate with a command like this: kate --line 3 "sftp://username@server:22/home/username/test.txt" if the file is not already opened in kate, it won't jump to line 3. If the file is already opened, it works. Local files are fine, only sftp urls are affected. I use a private key to log in, and it's added with ssh-add, so there's no password prompt, in case that matters. Reproducible: Always Steps to Reproduce: 1. Create a file with at least five lines on a remote server where you have ssh/sftp access. 2. Copy your public key to the remote server, and add your private key with ssh-add, so you can log in without any prompts. 3. Set up the remote server in dolphin (go to remote:/, Add network folder, etc.) 4. Open the file through sftp in kate. 5. Write down the url in the title bar, it should look like this: sftp://username@server:22/path/to/file 6. Close kate. 7. Open a terminal, and type: kate --line 5 followed by the url. Actual Results: The file is opened in kate, but the cursor is on the first line. Expected Results: The file is opened in kate, and the cursor is on the fifth line.
This sometimes happens with local files as well on Kate 5.0.0.
*** Bug 116793 has been marked as a duplicate of this bug. ***
*** Bug 386669 has been marked as a duplicate of this bug. ***
Still an issue, patches are welcome.
kate 20.08.1 I tried several local files and they were fine but sftp files did not highlight the correct line. Tried fish:// protocol as well, not highlighting there either.
I have a patch for this! I'm a complete newb in KDE dev and not sure how to submit it. I'll find out shortly...
(In reply to Marcell Fulop from comment #6) > I have a patch for this! I'm a complete newb in KDE dev and not sure how to > submit it. I'll find out shortly... See here :) https://community.kde.org/Get_Involved/development#Submit_a_Merge_Request Thank you for the contribution!
https://invent.kde.org/utilities/kate/-/merge_requests/281
Author: Christoph Cullmann <cullmann@kde.org> 2021-03-14 13:39:27 Committer: Christoph Cullmann <cullmann@kde.org> 2021-03-14 13:39:27 Parent: a05525ee885a7545c5d1677faa66e63578d7e520 (SVN_SILENT made messages (.desktop file) - always resolve ours) Parent: 85e39621f8ff30eeba3444de45d76a37dd84056f (SVN_SILENT clang-format ignore) Branches: release/21.04, remotes/origin/release/21.04 Follows: v19.12.2 Precedes: Merge branch 'master' into release/21.04 => merging the https://invent.kde.org/utilities/kate/-/merge_requests/295 stuff BUG: 335608