http://bugs.winehq.org/show_bug.cgi?id=12567
Summary: Richedit always uses word wrap Product: Wine Version: 0.9.59. Platform: PC OS/Version: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: richedit AssignedTo: wine-bugs@winehq.org ReportedBy: m.marwedel@onlinehome.de
A Richedit field always wraps lines if they do not fit, even if word wrap has been disabled.
Steps to reproduce: Place a RichEdit into the Form of a Delphi project (Delphi 5 in my case). Set WordWrap in the Object Inspector to false. Put some long text into the Edit field and change the width of the RichEdit while running the program. The text still wraps. A simple Memo object behaves (instead) properly if WordWrap is set to false.
This has the following influence: If there is a long text in line 0, and an 'A' in line 1. The line 0 gets wrapped. As result: The comparison if (richedit.line[1] = 'A') then ... passes on a Windows machine, but fails on WINE.
I think this Bug has been already in WINE since many versions.
http://bugs.winehq.org/show_bug.cgi?id=12567
--- Comment #1 from Austin English austinenglish@gmail.com 2008-04-13 21:01:26 --- Can you attach a test app showing this (preferably source and binary).
http://bugs.winehq.org/show_bug.cgi?id=12567
--- Comment #2 from Malte m.marwedel@onlinehome.de 2008-04-14 03:04:10 --- Created an attachment (id=12163) --> (http://bugs.winehq.org/attachment.cgi?id=12163) Shows the different behavior between WordWrap in a memo and richedit field
Interestingly, the behavior differs, if the scrollBars are set to None, or Both. I tested the Application under Vista too, here it behaves as expected (however there are some differences between a Memo and Richedit too).
http://bugs.winehq.org/show_bug.cgi?id=12567
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Keywords| |download, testcase
--- Comment #3 from Austin English austinenglish@gmail.com 2008-04-14 15:10:18 --- Confirming. You have to adjust the width with the scrollbar, then differing behavior on wine and windows will appear.
If scrollbars set to none: windows: there are no scrollbars wine: there is a vertical scrollbar on the richedit dialog, not memo.
If scrollbars set to both: windows: scrollbars appear on both dialogs, though it varies between vertical/horizontal/both depending on width. wine: There is a vertical scrollbar on memo (and horizontal if width is short enough), but none on the richedit field.
Any chance you can port this to the wine testsuite?
http://bugs.winehq.org/show_bug.cgi?id=12567
--- Comment #4 from Malte m.marwedel@onlinehome.de 2008-04-15 11:22:11 --- Interestingly I get differences in the behavior of the word wrapping between wine 0.9.58 (Debian) and 0.9.59 (Kubuntu).
The behavior for the memo dialog is the same, but for the richedit dialog: scrollbars: None, wordWrap: false, WINE: 0.9.58: No wrapping of text and no scrollbars scrollbars: None, wordWrap: false, WINE: 0.9.59: The text is wrapped if too long and a vertical scrollbar appears if the text would be out of sight scrollbars: Both, wordWrap: false, WINE: 0.9.58: No wrapping of text and no scrollbars scrollbars: Both, wordWrap: false, WINE: 0.9.59: No wrapping of text and no scrollbars scrollbars: None, wordWrap: true, WINE: 0.9.58: No wrapping of text and no scrollbars scrollbars: None, wordWrap: true, WINE: 0.9.59: The text is wrapped if too long and a vertical scrollbar appears if the text would be out of sight scrollbars: Both, wordWrap: true, WINE: 0.9.58: No wrapping of text and no scrollbars scrollbars: both, wordWrap: true, WINE: 0.9.59: No wrapping of text and no scrollbars
For me it looks like 0.9.59 wraps even if it should not and 0.9.58 never wraps. Could this be related to the fix mentioned in the logfile: http://www.winehq.org/?announce=0.9.59 "richedit: Fixed the initialization of the word wrap mode."?
Any chance you can port this to the wine testsuite?
I am sorry, I am not familiar with the WINE development.
http://bugs.winehq.org/show_bug.cgi?id=12567
Krzysztof Kotlenga piernik@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |piernik@gmail.com
http://bugs.winehq.org/show_bug.cgi?id=12567
--- Comment #5 from Dylan Smith dylan.ah.smith@gmail.com 2008-10-03 17:14:27 --- Created an attachment (id=16452) --> (http://bugs.winehq.org/attachment.cgi?id=16452) richedit: ES_AUTOHSCROLL window style disables word wrapping.
I can confirm the inconsistency with native richedit.
I tested the program with WINEDEBUG="message" and filtered with grep RichEdit in order to figure out how word wrap was being changed. The program seems to destroy the window and re-create while while toggling the ES_AUTOHSCROLL style bit used on creation.
Thanks for pointing out the change that caused the scrollbar to affect whether or not the wrapping was happening. I grepped the logs to find the commit, and at first it seems like he mistook WS_HSCROLL as affecting the word wrap instead of ES_AUTOHSCROLL, but normally either ES_AUTOHSCROLL or WS_HSCROLL turns off word wrap.
The attached patch seems to fix part of the problem by allowing ES_AUTOHSCROLL to turn off word wrap.
The case I fixed is: ssNone + no WordWrap = no word wrapping
So the case that is still inconsistent is: ssBoth + WordWrap except word wrapping, but currently doesn't word wrap
http://bugs.winehq.org/show_bug.cgi?id=12567
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch
http://bugs.winehq.org/show_bug.cgi?id=12567
Dylan Smith dylan.ah.smith@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #16452|0 |1 is obsolete| |
--- Comment #6 from Dylan Smith dylan.ah.smith@gmail.com 2008-10-06 16:15:29 --- (From update of attachment 16452) Committed with ID 4785c2fa2d8c62c77a9f5a4d2dd6547ce871278a
So no more need to apply this patch if testing against the current git tree, however this is only a partial fix.
http://bugs.winehq.org/show_bug.cgi?id=12567
Dylan Smith dylan.ah.smith@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|wine-bugs@winehq.org |dylan.ah.smith@gmail.com Status|NEW |ASSIGNED
--- Comment #7 from Dylan Smith dylan.ah.smith@gmail.com 2008-10-26 22:08:39 --- Created an attachment (id=16924) --> (http://bugs.winehq.org/attachment.cgi?id=16924) richedit: Fixed initial word wrap setting when emulating 1.0
I finally figured out that richedit version 1.0 was being emulated. Once I figured that out I was able to quickly determine that v1.0 only checks one of the two window styles that later versions check to enable/disable word wrapping, so I made this patch to fix it.
http://bugs.winehq.org/show_bug.cgi?id=12567
Dylan Smith dylan.ah.smith@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #16924|0 |1 is obsolete| |
--- Comment #8 from Dylan Smith dylan.ah.smith@gmail.com 2008-10-27 15:42:10 --- (From update of attachment 16924) In git as commit 4c28a5bcfb7c3818eff8d9a423a954d851a1c302
I think this bug is fixed now.
http://bugs.winehq.org/show_bug.cgi?id=12567
Dylan Smith dylan.ah.smith@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Resolution| |FIXED
--- Comment #9 from Dylan Smith dylan.ah.smith@gmail.com 2009-01-16 13:26:18 --- (In reply to comment #8)
(From update of attachment 16924 [details]) In git as commit 4c28a5bcfb7c3818eff8d9a423a954d851a1c302
I think this bug is fixed now.
This has been fixed for a while now (since wine-1.1.8).
http://bugs.winehq.org/show_bug.cgi?id=12567
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #10 from Alexandre Julliard julliard@winehq.org 2009-01-30 11:04:06 --- Closing bugs fixed in 1.1.14.