Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
3ba41908
Commit
3ba41908
authored
Oct 29, 2020
by
Huw Davies
Committed by
Alexandre Julliard
Oct 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
riched20: Use paragraph ptrs in the table move from row start function.
Signed-off-by:
Huw Davies
<
huw@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
96307570
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
11 deletions
+12
-11
editor.c
dlls/riched20/editor.c
+1
-1
editor.h
dlls/riched20/editor.h
+1
-1
table.c
dlls/riched20/table.c
+8
-7
undo.c
dlls/riched20/undo.c
+2
-2
No files found.
dlls/riched20/editor.c
View file @
3ba41908
...
...
@@ -2690,7 +2690,7 @@ ME_KeyDown(ME_TextEditor *editor, WORD nKey)
}
else
return
TRUE
;
ME_MoveCursorFromTableRowStartParagraph
(
editor
);
table_move_from_row_start
(
editor
);
ME_UpdateSelectionLinkAttribute
(
editor
);
ME_UpdateRepaint
(
editor
,
FALSE
);
ME_SendRequestResize
(
editor
,
FALSE
);
...
...
dlls/riched20/editor.h
View file @
3ba41908
...
...
@@ -302,6 +302,7 @@ ME_Paragraph *table_insert_cell( ME_TextEditor *editor, ME_Cursor *cursor ) DECL
ME_Paragraph
*
table_insert_row_end
(
ME_TextEditor
*
editor
,
ME_Cursor
*
cursor
)
DECLSPEC_HIDDEN
;
ME_Paragraph
*
table_insert_row_start
(
ME_TextEditor
*
editor
,
ME_Cursor
*
cursor
)
DECLSPEC_HIDDEN
;
ME_Paragraph
*
table_insert_row_start_at_para
(
ME_TextEditor
*
editor
,
ME_Paragraph
*
para
)
DECLSPEC_HIDDEN
;
void
table_move_from_row_start
(
ME_TextEditor
*
editor
)
DECLSPEC_HIDDEN
;
ME_Paragraph
*
table_outer_para
(
ME_Paragraph
*
para
)
DECLSPEC_HIDDEN
;
void
table_protect_partial_deletion
(
ME_TextEditor
*
editor
,
ME_Cursor
*
c
,
int
*
num_chars
)
DECLSPEC_HIDDEN
;
ME_Paragraph
*
table_row_end
(
ME_Paragraph
*
para
)
DECLSPEC_HIDDEN
;
...
...
@@ -309,7 +310,6 @@ ME_Cell *table_row_end_cell( ME_Paragraph *para ) DECLSPEC_HIDDEN;
ME_Cell
*
table_row_first_cell
(
ME_Paragraph
*
para
)
DECLSPEC_HIDDEN
;
ME_Paragraph
*
table_row_start
(
ME_Paragraph
*
para
)
DECLSPEC_HIDDEN
;
void
ME_CheckTablesForCorruption
(
ME_TextEditor
*
editor
)
DECLSPEC_HIDDEN
;
void
ME_MoveCursorFromTableRowStartParagraph
(
ME_TextEditor
*
editor
)
DECLSPEC_HIDDEN
;
struct
RTFTable
*
ME_MakeTableDef
(
ME_TextEditor
*
editor
)
DECLSPEC_HIDDEN
;
void
ME_InitTableDef
(
ME_TextEditor
*
editor
,
struct
RTFTable
*
tableDef
)
DECLSPEC_HIDDEN
;
static
inline
ME_DisplayItem
*
cell_get_di
(
ME_Cell
*
cell
)
...
...
dlls/riched20/table.c
View file @
3ba41908
...
...
@@ -629,16 +629,17 @@ void table_handle_tab( ME_TextEditor *editor, BOOL selected_row )
/* Make sure the cursor is not in the hidden table row start paragraph
* without a selection. */
void
ME_MoveCursorFromTableRowStartParagraph
(
ME_TextEditor
*
editor
)
void
table_move_from_row_start
(
ME_TextEditor
*
editor
)
{
ME_DisplayItem
*
para
=
editor
->
pCursors
[
0
].
pPara
;
if
(
para
==
editor
->
pCursors
[
1
].
pPara
&&
para
->
member
.
para
.
nFlags
&
MEPF_ROWSTART
)
{
ME_Paragraph
*
para
=
&
editor
->
pCursors
[
0
].
pPara
->
member
.
para
;
if
(
para
==
&
editor
->
pCursors
[
1
].
pPara
->
member
.
para
&&
para
->
nFlags
&
MEPF_ROWSTART
)
{
/* The cursors should not be at the hidden start row paragraph without
* a selection, so the cursor is moved into the first cell. */
para
=
para
->
member
.
para
.
next_para
;
editor
->
pCursors
[
0
].
pPara
=
para
;
editor
->
pCursors
[
0
].
pRun
=
ME_FindItemFwd
(
para
,
diRun
);
para
=
para
_next
(
para
)
;
editor
->
pCursors
[
0
].
pPara
=
para
_get_di
(
para
)
;
editor
->
pCursors
[
0
].
pRun
=
run_get_di
(
para_first_run
(
para
)
);
editor
->
pCursors
[
0
].
nOffset
=
0
;
editor
->
pCursors
[
1
]
=
editor
->
pCursors
[
0
];
}
...
...
dlls/riched20/undo.c
View file @
3ba41908
...
...
@@ -438,7 +438,7 @@ BOOL ME_Undo(ME_TextEditor *editor)
destroy_undo_item
(
undo
);
}
ME_MoveCursorFromTableRowStartParagraph
(
editor
);
table_move_from_row_start
(
editor
);
add_undo
(
editor
,
undo_end_transaction
);
ME_CheckTablesForCorruption
(
editor
);
editor
->
nUndoStackSize
--
;
...
...
@@ -475,7 +475,7 @@ BOOL ME_Redo(ME_TextEditor *editor)
list_remove
(
&
undo
->
entry
);
destroy_undo_item
(
undo
);
}
ME_MoveCursorFromTableRowStartParagraph
(
editor
);
table_move_from_row_start
(
editor
);
add_undo
(
editor
,
undo_end_transaction
);
ME_CheckTablesForCorruption
(
editor
);
editor
->
nUndoMode
=
nMode
;
...
...
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