Suppose one wishes to complete the following: \begin{env}|Stuff that should be in the environment where the enter key is pressed at the position of the pipe. Then, depending on the indenting of the initial line, the output is something like: \begin{env}Stuff that s \end{env}hould be in the environment whereas IMO it should be \begin{env} Stuff that should be in the environment \end{env} Reproducible: Always Steps to Reproduce: 1. Type the stated text into the editor with code completion turned on. 2. Press enter with the caret at the stated position. Actual Results: \begin{env}Stuff that s \end{env}hould be in the environment Expected Results: \begin{env} Stuff that should be in the environment \end{env} It also happens for completion of "\[". It is arguable that the expected result should be \begin{env} \end{env}Stuff that should be in the environment which is the behaviour if there is no indentation.
Also present in 2.9.60. It actually seems to only occur when tabs are used as indentation characters. Also I erroneously stated that the actually result when there is no indentation (or only spaces are used for indentation) is \begin{env} \end{env}Stuff that should be in the environment when it is actually \begin{env} \end{env} Stuff that should be in the environment
Similarly the actual result is \begin{env}Stuff that s \end{env} hould be in the environment
Created attachment 84471 [details] Partial fix for the tabbed indetation. This seems to fix the case of tabbed indentation causing the the auto-completion of: \begin{env}|asdfsadf to \begin{env}|asd fsadf
Dear Bug Submitter, This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond. Thank you for helping us make KDE software even better for everyone!
Dear Bug Submitter, This is a reminder that this bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? This bug will be moved back to REPORTED Status for manual review later, which may take a while. If you are able to, please lend us a hand. Thank you for helping us make KDE software even better for everyone!
Still reproducible with kile 2.9.93 Operating System: Arch Linux KDE Plasma Version: 5.25.90 KDE Frameworks Version: 5.98.0 Qt Version: 5.15.6 Kernel Version: 5.15.68-1-lts (64-bit) Graphics Platform: X11
Git commit 7e142b1bec7de8a429ef401cc551797b2fbe61df by Michel Ludwig, on behalf of Kishore Gopalakrishnan. Committed on 01/07/2023 at 06:31. Pushed by mludwig into branch 'master'. Environment completion: don't use virtual cursor position What we actually need here is the real cursor position (where tab is counted as one character) rather than the virtual cursor position (where tab can count as multiple characters depending on the user's config). This commit makes sure that \end{env} is inserted in the right place even when the user uses tabs for indentation. M +1 -1 src/editorextension.cpp https://invent.kde.org/office/kile/-/commit/7e142b1bec7de8a429ef401cc551797b2fbe61df