Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Z
zeroing-editor
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
劳工
zeroing-editor
Commits
aed789d3
Commit
aed789d3
authored
Apr 27, 2020
by
rockyl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复冲突合并的bug
parent
cf4b7476
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
7 deletions
+15
-7
ProjectConflictResolveDialog.vue
src/views/Editor/dialogs/ProjectConflictResolveDialog.vue
+14
-6
yarn.lock
yarn.lock
+1
-1
No files found.
src/views/Editor/dialogs/ProjectConflictResolveDialog.vue
View file @
aed789d3
...
@@ -348,7 +348,7 @@
...
@@ -348,7 +348,7 @@
//console.log(merged);
//console.log(merged);
let
startLine
=
modifiedStartLineNumber
+
offset
;
let
startLine
=
modifiedStartLineNumber
+
offset
+
(
modifiedEndLineNumber
===
0
?
1
:
0
)
;
mergedCodeLines
.
splice
(
startLine
-
1
,
modifiedEndLineNumber
-
modifiedStartLineNumber
+
1
,
...
merged
);
mergedCodeLines
.
splice
(
startLine
-
1
,
modifiedEndLineNumber
-
modifiedStartLineNumber
+
1
,
...
merged
);
offset
+=
3
+
remotePart
.
length
;
offset
+=
3
+
remotePart
.
length
;
}
}
...
@@ -387,10 +387,11 @@
...
@@ -387,10 +387,11 @@
}
}
break
;
break
;
}
}
if
(
replacer
!==
undefined
)
{
/*
if (replacer !== undefined) {
replaceText(replacer);
replaceText(replacer);
//this.localData = lines.join('\n');
//this.localData = lines.join('\n');
}
}*/
replaceText
(
replacer
);
this
.
delayTrack
();
this
.
delayTrack
();
this
.
conflictIndex
--
;
this
.
conflictIndex
--
;
...
@@ -404,18 +405,25 @@
...
@@ -404,18 +405,25 @@
}
}
return
resultLines
.
join
(
'
\
n'
);
return
resultLines
.
join
(
'
\
n'
);
}
}
return
null
;
}
}
function
replaceText
(
replacer
)
{
function
replaceText
(
replacer
)
{
model
.
pushEditOperations
([],
[
{
let
op
=
{
range
:
{
range
:
{
startLineNumber
:
conflict
.
remoteLine
+
1
,
startLineNumber
:
conflict
.
remoteLine
+
1
,
startColumn
:
0
,
startColumn
:
1
,
endLineNumber
:
conflict
.
localLine
+
1
,
endLineNumber
:
conflict
.
localLine
+
1
,
endColumn
:
Number
.
MAX_VALUE
,
endColumn
:
Number
.
MAX_VALUE
,
},
},
text
:
replacer
,
text
:
replacer
,
}],
()
=>
[]);
};
if
(
replacer
===
null
)
{
op
.
range
.
startLineNumber
=
conflict
.
remoteLine
;
op
.
range
.
startColumn
=
Number
.
MAX_VALUE
;
}
model
.
pushEditOperations
([],
[
op
],
()
=>
[]);
}
}
},
},
...
mapMutations
([
...
mapMutations
([
...
...
yarn.lock
View file @
aed789d3
...
@@ -8703,7 +8703,7 @@ vue-loader@^15.7.0:
...
@@ -8703,7 +8703,7 @@ vue-loader@^15.7.0:
"vue-monaco@http://gitlab2.dui88.com/laoqifeng/vue-monaco.git":
"vue-monaco@http://gitlab2.dui88.com/laoqifeng/vue-monaco.git":
version "0.3.1"
version "0.3.1"
resolved "http://gitlab2.dui88.com/laoqifeng/vue-monaco.git#
13de23ce8ba73525cf08678227ae0c579fe2319d
"
resolved "http://gitlab2.dui88.com/laoqifeng/vue-monaco.git#
d8153f9d3f41eee09a7a0c05212333dea5c86712
"
dependencies:
dependencies:
monaco-editor "^0.20.0"
monaco-editor "^0.20.0"
nano-assign "^1.0.0"
nano-assign "^1.0.0"
...
...
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