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
a8edb3e4
Commit
a8edb3e4
authored
May 23, 2000
by
Andreas Mohr
Committed by
Alexandre Julliard
May 23, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Some part of EDIT_EM_LineLength code was commented (broken). Restored
the capability to calculate the remaining non-selected chars of a selection area.
parent
75f98cfc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
11 deletions
+14
-11
edit.c
controls/edit.c
+14
-11
No files found.
controls/edit.c
View file @
a8edb3e4
...
@@ -808,9 +808,9 @@ LRESULT WINAPI EditWndProc( HWND hwnd, UINT msg,
...
@@ -808,9 +808,9 @@ LRESULT WINAPI EditWndProc( HWND hwnd, UINT msg,
case
WM_MOUSEACTIVATE
:
case
WM_MOUSEACTIVATE
:
/*
/*
* FIXME: maybe DefWindowProc() screws up, but it seems that
* FIXME: maybe DefWindowProc() screws up, but it seems that
* mod
al
less dialog boxes need this. If we don't do this, the focus
* mod
e
less dialog boxes need this. If we don't do this, the focus
* will _not_ be set by DefWindowProc() for edit controls in a
* will _not_ be set by DefWindowProc() for edit controls in a
* mod
al
less dialog box ???
* mod
e
less dialog box ???
*/
*/
DPRINTF_EDIT_MSG32
(
"WM_MOUSEACTIVATE"
);
DPRINTF_EDIT_MSG32
(
"WM_MOUSEACTIVATE"
);
SetFocus
(
wnd
->
hwndSelf
);
SetFocus
(
wnd
->
hwndSelf
);
...
@@ -2236,14 +2236,17 @@ static INT EDIT_EM_LineLength(WND *wnd, EDITSTATE *es, INT index)
...
@@ -2236,14 +2236,17 @@ static INT EDIT_EM_LineLength(WND *wnd, EDITSTATE *es, INT index)
return
lstrlenA
(
es
->
text
);
return
lstrlenA
(
es
->
text
);
if
(
index
==
-
1
)
{
if
(
index
==
-
1
)
{
/* FIXME: broken
/* get the number of remaining non-selected chars of selected lines */
INT32 sl = EDIT_EM_LineFromChar(wnd, es, es->selection_start);
INT32
li
;
INT32 el = EDIT_EM_LineFromChar(wnd, es, es->selection_end);
INT32
count
;
return es->selection_start - es->line_defs[sl].offset +
li
=
EDIT_EM_LineFromChar
(
wnd
,
es
,
es
->
selection_start
);
es->line_defs[el].offset +
/* # chars before start of selection area */
es->line_defs[el].length - es->selection_end;
count
=
es
->
selection_start
-
EDIT_EM_LineIndex
(
wnd
,
es
,
li
);
*/
li
=
EDIT_EM_LineFromChar
(
wnd
,
es
,
es
->
selection_end
);
return
0
;
/* # chars after end of selection */
count
+=
EDIT_EM_LineIndex
(
wnd
,
es
,
li
)
+
EDIT_EM_LineLength
(
wnd
,
es
,
li
)
-
es
->
selection_end
;
return
count
;
}
}
line_def
=
es
->
first_line_def
;
line_def
=
es
->
first_line_def
;
index
-=
line_def
->
length
;
index
-=
line_def
->
length
;
...
@@ -2769,7 +2772,7 @@ static void EDIT_EM_SetSel(WND *wnd, EDITSTATE *es, UINT start, UINT end, BOOL a
...
@@ -2769,7 +2772,7 @@ static void EDIT_EM_SetSel(WND *wnd, EDITSTATE *es, UINT start, UINT end, BOOL a
es
->
flags
&=
~
EF_AFTER_WRAP
;
es
->
flags
&=
~
EF_AFTER_WRAP
;
if
(
es
->
flags
&
EF_FOCUSED
)
if
(
es
->
flags
&
EF_FOCUSED
)
EDIT_SetCaretPos
(
wnd
,
es
,
end
,
after_wrap
);
EDIT_SetCaretPos
(
wnd
,
es
,
end
,
after_wrap
);
/* This is
little
bit more efficient than before, not sure if it can be improved. FIXME? */
/* This is
a little
bit more efficient than before, not sure if it can be improved. FIXME? */
ORDER_UINT
(
start
,
end
);
ORDER_UINT
(
start
,
end
);
ORDER_UINT
(
end
,
old_end
);
ORDER_UINT
(
end
,
old_end
);
ORDER_UINT
(
start
,
old_start
);
ORDER_UINT
(
start
,
old_start
);
...
...
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