Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
1cf8fea7
Commit
1cf8fea7
authored
Mar 16, 2021
by
Huw Davies
Committed by
Alexandre Julliard
Mar 16, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Use the multiline property rather than style.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
030fbc45
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
18 deletions
+10
-18
caret.c
dlls/riched20/caret.c
+2
-2
editor.c
dlls/riched20/editor.c
+6
-14
paint.c
dlls/riched20/paint.c
+2
-2
No files found.
dlls/riched20/caret.c
View file @
1cf8fea7
...
@@ -99,7 +99,7 @@ int ME_GetTextLengthEx(ME_TextEditor *editor, const GETTEXTLENGTHEX *how)
...
@@ -99,7 +99,7 @@ int ME_GetTextLengthEx(ME_TextEditor *editor, const GETTEXTLENGTHEX *how)
length
=
ME_GetTextLength
(
editor
);
length
=
ME_GetTextLength
(
editor
);
if
((
editor
->
styleFlags
&
ES
_MULTILINE
)
if
((
editor
->
props
&
TXTBIT
_MULTILINE
)
&&
(
how
->
flags
&
GTL_USECRLF
)
&&
(
how
->
flags
&
GTL_USECRLF
)
&&
!
editor
->
bEmulateVersion10
)
/* Ignore GTL_USECRLF flag in 1.0 emulation */
&&
!
editor
->
bEmulateVersion10
)
/* Ignore GTL_USECRLF flag in 1.0 emulation */
length
+=
editor
->
nParagraphs
-
1
;
length
+=
editor
->
nParagraphs
-
1
;
...
@@ -549,7 +549,7 @@ void ME_InsertTextFromCursor(ME_TextEditor *editor, int nCursor,
...
@@ -549,7 +549,7 @@ void ME_InsertTextFromCursor(ME_TextEditor *editor, int nCursor,
int
eol_len
=
0
;
int
eol_len
=
0
;
/* Check if new line is allowed for this control */
/* Check if new line is allowed for this control */
if
(
!
(
editor
->
styleFlags
&
ES
_MULTILINE
))
if
(
!
(
editor
->
props
&
TXTBIT
_MULTILINE
))
break
;
break
;
/* Find number of CR and LF in end of paragraph run */
/* Find number of CR and LF in end of paragraph run */
...
...
dlls/riched20/editor.c
View file @
1cf8fea7
...
@@ -2461,7 +2461,7 @@ static BOOL handle_enter(ME_TextEditor *editor)
...
@@ -2461,7 +2461,7 @@ static BOOL handle_enter(ME_TextEditor *editor)
}
}
}
}
if
(
editor
->
styleFlags
&
ES
_MULTILINE
)
if
(
editor
->
props
&
TXTBIT
_MULTILINE
)
{
{
ME_Cursor
cursor
=
editor
->
pCursors
[
0
];
ME_Cursor
cursor
=
editor
->
pCursors
[
0
];
ME_Paragraph
*
para
=
cursor
.
para
;
ME_Paragraph
*
para
=
cursor
.
para
;
...
@@ -3118,15 +3118,7 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10)
...
@@ -3118,15 +3118,7 @@ ME_TextEditor *ME_MakeEditor(ITextHost *texthost, BOOL bEmulateVersion10)
if
(
ed
->
props
&
TXTBIT_USEPASSWORD
)
if
(
ed
->
props
&
TXTBIT_USEPASSWORD
)
ITextHost_TxGetPasswordChar
(
texthost
,
&
ed
->
cPasswordMask
);
ITextHost_TxGetPasswordChar
(
texthost
,
&
ed
->
cPasswordMask
);
if
(
ed
->
props
&
TXTBIT_MULTILINE
)
{
ed
->
bWordWrap
=
(
ed
->
props
&
TXTBIT_WORDWRAP
)
&&
(
ed
->
props
&
TXTBIT_MULTILINE
);
ed
->
styleFlags
|=
ES_MULTILINE
;
ed
->
bWordWrap
=
(
ed
->
props
&
TXTBIT_WORDWRAP
)
!=
0
;
}
else
{
ed
->
bWordWrap
=
FALSE
;
}
if
(
ed
->
props
&
TXTBIT_DISABLEDRAG
)
ed
->
styleFlags
|=
ES_NOOLEDRAGDROP
;
ed
->
notified_cr
.
cpMin
=
ed
->
notified_cr
.
cpMax
=
0
;
ed
->
notified_cr
.
cpMin
=
ed
->
notified_cr
.
cpMax
=
0
;
...
@@ -3435,7 +3427,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
...
@@ -3435,7 +3427,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
if
(
lParam
)
if
(
lParam
)
editor
->
bDialogMode
=
TRUE
;
editor
->
bDialogMode
=
TRUE
;
if
(
editor
->
styleFlags
&
ES
_MULTILINE
)
if
(
editor
->
props
&
TXTBIT
_MULTILINE
)
code
|=
DLGC_WANTMESSAGE
;
code
|=
DLGC_WANTMESSAGE
;
if
(
!
(
editor
->
props
&
TXTBIT_SAVESELECTION
))
if
(
!
(
editor
->
props
&
TXTBIT_SAVESELECTION
))
code
|=
DLGC_HASSETSEL
;
code
|=
DLGC_HASSETSEL
;
...
@@ -3784,7 +3776,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
...
@@ -3784,7 +3776,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
}
}
case
EM_LINESCROLL
:
case
EM_LINESCROLL
:
{
{
if
(
!
(
editor
->
styleFlags
&
ES
_MULTILINE
))
if
(
!
(
editor
->
props
&
TXTBIT
_MULTILINE
))
return
FALSE
;
return
FALSE
;
ME_ScrollDown
(
editor
,
lParam
*
get_default_line_height
(
editor
)
);
ME_ScrollDown
(
editor
,
lParam
*
get_default_line_height
(
editor
)
);
return
TRUE
;
return
TRUE
;
...
@@ -4579,7 +4571,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
...
@@ -4579,7 +4571,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
case
EM_SETTARGETDEVICE
:
case
EM_SETTARGETDEVICE
:
if
(
wParam
==
0
)
if
(
wParam
==
0
)
{
{
BOOL
new
=
(
lParam
==
0
&&
(
editor
->
styleFlags
&
ES
_MULTILINE
));
BOOL
new
=
(
lParam
==
0
&&
(
editor
->
props
&
TXTBIT
_MULTILINE
));
if
(
editor
->
nAvailWidth
||
editor
->
bWordWrap
!=
new
)
if
(
editor
->
nAvailWidth
||
editor
->
bWordWrap
!=
new
)
{
{
editor
->
bWordWrap
=
new
;
editor
->
bWordWrap
=
new
;
...
@@ -4588,7 +4580,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
...
@@ -4588,7 +4580,7 @@ LRESULT ME_HandleMessage(ME_TextEditor *editor, UINT msg, WPARAM wParam,
}
}
}
else
{
}
else
{
int
width
=
max
(
0
,
lParam
);
int
width
=
max
(
0
,
lParam
);
if
((
editor
->
styleFlags
&
ES
_MULTILINE
)
&&
if
((
editor
->
props
&
TXTBIT
_MULTILINE
)
&&
(
!
editor
->
bWordWrap
||
editor
->
nAvailWidth
!=
width
))
(
!
editor
->
bWordWrap
||
editor
->
nAvailWidth
!=
width
))
{
{
editor
->
nAvailWidth
=
width
;
editor
->
nAvailWidth
=
width
;
...
...
dlls/riched20/paint.c
View file @
1cf8fea7
...
@@ -1086,7 +1086,7 @@ void ME_ScrollAbs(ME_TextEditor *editor, int x, int y)
...
@@ -1086,7 +1086,7 @@ void ME_ScrollAbs(ME_TextEditor *editor, int x, int y)
bScrollBarIsVisible
=
(
winStyle
&
WS_VSCROLL
)
!=
0
;
bScrollBarIsVisible
=
(
winStyle
&
WS_VSCROLL
)
!=
0
;
bScrollBarWillBeVisible
=
(
editor
->
nTotalLength
>
editor
->
sizeWindow
.
cy
bScrollBarWillBeVisible
=
(
editor
->
nTotalLength
>
editor
->
sizeWindow
.
cy
&&
(
editor
->
scrollbars
&
WS_VSCROLL
)
&&
(
editor
->
scrollbars
&
WS_VSCROLL
)
&&
(
editor
->
styleFlags
&
ES
_MULTILINE
))
&&
(
editor
->
props
&
TXTBIT
_MULTILINE
))
||
(
editor
->
scrollbars
&
ES_DISABLENOSCROLL
);
||
(
editor
->
scrollbars
&
ES_DISABLENOSCROLL
);
if
(
bScrollBarIsVisible
!=
bScrollBarWillBeVisible
)
if
(
bScrollBarIsVisible
!=
bScrollBarWillBeVisible
)
ITextHost_TxShowScrollBar
(
editor
->
texthost
,
SB_VERT
,
ITextHost_TxShowScrollBar
(
editor
->
texthost
,
SB_VERT
,
...
@@ -1211,7 +1211,7 @@ void ME_UpdateScrollBar(ME_TextEditor *editor)
...
@@ -1211,7 +1211,7 @@ void ME_UpdateScrollBar(ME_TextEditor *editor)
/* Update vertical scrollbar */
/* Update vertical scrollbar */
bScrollBarWasVisible
=
editor
->
vert_si
.
nMax
>
editor
->
vert_si
.
nPage
;
bScrollBarWasVisible
=
editor
->
vert_si
.
nMax
>
editor
->
vert_si
.
nPage
;
bScrollBarWillBeVisible
=
editor
->
nTotalLength
>
editor
->
sizeWindow
.
cy
&&
bScrollBarWillBeVisible
=
editor
->
nTotalLength
>
editor
->
sizeWindow
.
cy
&&
(
editor
->
styleFlags
&
ES
_MULTILINE
);
(
editor
->
props
&
TXTBIT
_MULTILINE
);
if
(
editor
->
vert_si
.
nPos
&&
!
bScrollBarWillBeVisible
)
if
(
editor
->
vert_si
.
nPos
&&
!
bScrollBarWillBeVisible
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment