| Summary: | SWT StyledText with WordWrap on doLineEnd moves the caret after the line break character | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Hugo Corbucci <nightao> | ||||
| Component: | SWT | Assignee: | Scott Kovatch <skovatch> | ||||
| Status: | RESOLVED INVALID | QA Contact: | Scott Kovatch <skovatch> | ||||
| Severity: | minor | ||||||
| Priority: | P3 | CC: | eclipse.felipe, skovatch | ||||
| Version: | 4.0 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | Macintosh | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Hugo Corbucci
Created attachment 179289 [details]
Patch to maintain line ends before their breaks in wrapping situations
Very simple verification that checks whether the visual line is breaking to another visual line or if it is the last one.
If it is not the last one, shows the previous offset as lineEnd.
Thanks for the patch! It looks good to me, but I'll leave it for Felipe to review when he gets back from paternity leave. Verified this works on Mac and Windows, so I'm checking it in. Thanks for the patch! Fixed > 20101013. I removed the patch, the old behaviour was the correct one. Please use notepad as reference (I also compared to TextEdit, the old behaviour is correct on the Mac too). (In reply to comment #4) > I removed the patch, the old behaviour was the correct one. Please use notepad > as reference (I also compared to TextEdit, the old behaviour is correct on the > Mac too). I stand corrected. The new behavior looked good, but you're right, it's not consistent with TextEdit. Sorry about that... I agree it is not like TextEdit but it sure feels wrong. It is a behavior that only triggers on this specific action whereas all other actions trigger the other behavior. Is it not possible that this is just a bug on TextEdit that nobody really cares about? It looks like, from a usability point of view, going to the end of the line should work like it does when you go to the end of a non-wrapped line. Unless you consider this is a way to give feedback to the user that this line is wrapped. If that is the case, the feedback is quite weak. Anyway, I did not knew the policy was to just follow Notepad's behavior. Sorry about that then. >Unless you consider this is a way to give feedback to the user that this line >is wrapped. If that is the case, the feedback is quite weak. Huh ? The current behaviour is consistent with the native behaviour on Windows and Mac. That *is* the best feedback possible IMO, it means StyledText is behaving the way (the majority of) users expect. If this is really a problem for your application I can help to write code to override it in your app. > Anyway, I did not knew the policy was to just follow Notepad's behavior. Not always, but when it goes to cursor navigation on windows Notepad is a good references (it is native text editor). OK. Can't really think of any better way to provide this kind of feedback. It is just in our case, it is useless to provide such feedback because the user only uses a wrapped styled text so he pretty much knows lines are wrapped thanks to other factors. We already have that patch applied in our app so we are fine about it. It just felt like something to be contributed back. Sorry it was not. Thanks for the clarifications. |