| Summary: | Pasted text contains only one space if clipboard content starts with tab | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [WebTools] WTP Source Editing | Reporter: | Andrey Loskutov <loskutov> | ||||||||
| Component: | wst.sse | Assignee: | David Williams <david_williams> | ||||||||
| Status: | CLOSED FIXED | QA Contact: | |||||||||
| Severity: | major | ||||||||||
| Priority: | P2 | CC: | david_williams, for.work.things, mhilpert, wyuenho | ||||||||
| Version: | 0.7 | ||||||||||
| Target Milestone: | 1.0 M7.1 | ||||||||||
| Hardware: | PC | ||||||||||
| OS: | Windows XP | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Andrey Loskutov
Yes, you are indeed correct this bug is related to the fix for bug 71271. Namely the autoeditstrategyfortabs. It is currently checking for if any content is inserted into the editor and starts with a tab character, the whole content is replaced with the appropriate space character only. Hmm. I know I can fix it such that if any content is inserted into the editor and that content is exactly 1 tab character, the tab character is replaced by the appropriate space characters. Would people mind if they copied a tab character and it pasted as spaces instead? I think, inserting text in editor where clipboard contains leading whitespace should always follow the tabs/spaces preferences of current editor and then replace leading characters with appropriated before inserting to the file. Then if I have selected, that I always should get spaces by hitting the "tab" key, then I would also expect, that all leading tabs are to be converted if I paste them to editor. Otherwise I would get an *unexpected* "mix" in the source. Anyway, all non-whitespace chars should be preserved ;) agreed that all non-whitespace characters should be preserved :) okay, i don't know about the fixing up leading whitespace when you paste. that may be a whole separate new enhancement for auto-indenting. but i think what i can do is fix the code so that if you do have the indent using spaces preference set, all tab characters pasted in the editor will be converted to spaces, leading or not. this appears to be what java editor does. *** Bug 105657 has been marked as a duplicate of this bug. *** moving to 'major', p2 to honor the client's severity in the dup'd bug report. Created attachment 25760 [details]
org.eclipse.jst.jsp.ui.patch
Created attachment 25761 [details]
org.eclipse.wst.xml.ui.patch
Created attachment 25762 [details]
org.eclipse.wst.html.ui.internal.autoedit.patch
Fixed AutoEditStrategyForTabs in xml, html, jsp so that when you have the indent using spaces preference set AND you are in smart insert mode, any tab character you enter into the editor will be converted to spaces. also fixed the original problem so non-whitespace characters are left alone when you paste. reassigning to nitin to apply patches Patches applied to HEAD. Thanks, Amy. re-opening for consideration for 0.7.1, since there are many reports from users of failures that might be related to this. I'll take a look on 07 stream and be sure "compatible" with it before releasing. *** Bug 108339 has been marked as a duplicate of this bug. *** Released for 0.7.1 build. expect in M builds > 9/20. This bug is being moved to the "closed" state since it has been in the fixed state for a so long it is being assumed fixed, without explicit verification from the originator. If there is still a problem, in the most recent 1.5.x builds, please reopen or open another bug. |