| Summary: | Python indent mode doesn't unindent pass correctly with tabs | ||
|---|---|---|---|
| Product: | [Applications] kate | Reporter: | Yuriy Kozlov <yuriy.kozlov> |
| Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED WORKSFORME | ||
| Severity: | normal | CC: | esigra |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | Possible fix for wrong indentation | ||
Created attachment 19918 [details]
Possible fix for wrong indentation
Can someone with python knowledge confirm the patch?
The patch does not unindent the next line, but it fixes the issue with the two spaces, i.e. two tabs are inserted again. Unable to reproduce with kate 3.0.83 from KDE 4.1 Beta 2 Can't reproduce on 4.1 either. |
Version: (using KDE KDE 3.5.6) Installed from: Ubuntu Packages OS: Linux Minor bug: When using Python indentation and tabs, Kate doesn't unindent the "pass" statement correctly. It creates a space at the beginning of the next line. 1. Create a new document (File -> New). This must be done first, as Kate does not automatically apply indentation settings to new files (already filed a bug on this). 2. Go to Settings -> Configure Kate -> Editor -> Indentation and configure things as follows: Automatic Indentation: Indentation mode: Python Style (may be overridden by filetype) Indentation with Spaces: Use spaces instead of tabs to indent: Off (unchecked) 3. Type the following (note that the words in <angled brackets> are keys you should press, and should not be typed verbatim): class asdf: <return> pass <return> After pressing <return> the first time, a tab is inserted at the beginning of the next line. After the second time pressing <return> (after "pass"), the correct behavior would be to remove the tab and leave the following line unindented. Instead, Kate indents the next line with a single space. I have tried this more tabs and it converted each tab into a space on the following line, but I have been unable to reliably reproduce the effect with multiple tabs. Using Kubuntu Feisty with KDE 3.5.6 Originally reported here: https://bugs.launchpad.net/ubuntu/+source/kdebase/+bug/71270