| Summary: | Refactoring wrapping lines | ||
|---|---|---|---|
| Product: | [Frameworks and Libraries] frameworks-ktexteditor | Reporter: | Victor Varvaryuk <victor.varvariuc> |
| Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED NOT A BUG | ||
| Severity: | wishlist | CC: | christoph, illumilore |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Kubuntu | ||
| OS: | Linux | ||
| URL: | http://www.youtube.com/watch?v=VqL--A2p_Ss | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
Regarding 5. I suggest to use the word "splitting", instead of "wrapping". Is it possible to split lines not by '\n', but by some other delimiter, which is treated like new line (for performance during rendering), but is ignored when copying or saving the file? In other words, every line in the internal line buffers could have a single bit indicating if there is a final linefeed character to be saved. If splitting a line during load, this bit is cleared. If loading a regular line, it is set. Somehow I feel this should be relatively simple, seeing that Kate preserves that information for the last text line, but I did not actually check the source if it really is. "It would be better to ask the user upon opening a file with long lines if he wants to open it in read-only mode with the lines wrapped." There could also be an option right next to the close button in the orange/reddish message that appears near the top of the window when it opens read only mode that lets the user quickly toggle it to write mode. It would be more user findable than the toggle in tools menu. Slightly more streamlined than waiting to open the file at all until the user makes a decision. Also, how is the user supposed to know that setting line length limit to -1 disables it? It would be more user friendly to put a toggle switch to the left of "line length limit" in the settings that toggles it on or off that way instead of assuming that the user will know to use -1. I agree we could improve here, but this is no real "bug". Dear user, this wish list item is now closed, as it wasn't touched in the last year and no contributor stepped up to implement it. The Kate/KTextEditor team is small and we can just try to keep up with fixing bugs. Therefore wishes that show no activity for a years or more will be closed from now on to keep at least a bit overview about 'current' wishs of the users. If you want your feature to be implemented, please step up to provide some patch for it. If you think it is really needed, you can reopen your request, but keep in mind, if no new good arguments are made and no people get attracted to help out to implement it, it will expire in a year again. We have a nice website https://kate-editor.org that provides all the information needed to contribute, please make use of it. Patches can be handed in via https://phabricator.kde.org/differential/ Greetings Christoph Cullmann |
Is you can see in the video, i am pasting an XML content into a new file and save and when i open it again i get this message: > The file /home/vic/Desktop/test.txt was opened and contained lines longer than the configured Line Length Limit (1 024 characters). > Those lines were wrapped and the document is set to read-only mode, as saving will modify its content. There are are several issues with this behavior: 1. The file is really not set to read-only - as shown in the video, i press save and the file is corrupted 2. You close the annoying warning and then accidentally can copy corrupted data (this happened to me several times) 3. It's not very convenient - to go to settings, find the needed setting, change it, close the file and reopen it. 4. As far as i understand line wrapping appeared because of performance issues. If i change the setting, it becomes permanent, so next time i open a really big file, then i get the real trouble with performance. 5. "Wrapping" term is misleading. i expected that the line would be wrapped visually, not physically. 6. Inconsistent behavior - i successfully created a new file with a very long line, but cannot open the same file for editing without changing settings - annoying Suggestion: It would be better to ask the user upon opening a file with long lines if he wants to open it in read-only mode with the lines wrapped. Also it would nice to immediately give the user possibility to enter Line Length Limit, without going to settings. Reproducible: Always