Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
baas-ide
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
1
Merge Requests
1
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
guxukai
baas-ide
Commits
a16d7919
Commit
a16d7919
authored
Nov 05, 2020
by
LianaHus
Committed by
Liana Husikyan
Nov 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cleanup
parent
d48c3dd5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
10 deletions
+2
-10
test-tab.js
apps/remix-ide/src/app/tabs/test-tab.js
+0
-2
offsetToLineColumnConverter.js
apps/remix-ide/src/lib/offsetToLineColumnConverter.js
+2
-8
No files found.
apps/remix-ide/src/app/tabs/test-tab.js
View file @
a16d7919
...
@@ -141,10 +141,8 @@ module.exports = class TestTab extends ViewPlugin {
...
@@ -141,10 +141,8 @@ module.exports = class TestTab extends ViewPlugin {
location
=
this
.
offsetToLineColumnConverter
.
offsetToLineColumnWithContent
(
location
=
this
.
offsetToLineColumnConverter
.
offsetToLineColumnWithContent
(
location
,
location
,
parseInt
(
file
),
parseInt
(
file
),
runningTests
,
runningTests
[
fileName
].
content
runningTests
[
fileName
].
content
)
)
this
.
fileManager
.
open
(
fileName
)
await
this
.
call
(
'editor'
,
'discardHighlight'
)
await
this
.
call
(
'editor'
,
'discardHighlight'
)
await
this
.
call
(
'editor'
,
'highlight'
,
location
,
fileName
)
await
this
.
call
(
'editor'
,
'highlight'
,
location
,
fileName
)
}
}
...
...
apps/remix-ide/src/lib/offsetToLineColumnConverter.js
View file @
a16d7919
...
@@ -36,14 +36,8 @@ export class OffsetToLineColumnConverter extends Plugin {
...
@@ -36,14 +36,8 @@ export class OffsetToLineColumnConverter extends Plugin {
return
this
.
sourceMappingDecoder
.
convertOffsetToLineColumn
(
rawLocation
,
this
.
lineBreakPositionsByContent
[
file
])
return
this
.
sourceMappingDecoder
.
convertOffsetToLineColumn
(
rawLocation
,
this
.
lineBreakPositionsByContent
[
file
])
}
}
offsetToLineColumnWithContent
(
rawLocation
,
file
,
sources
,
content
)
{
offsetToLineColumnWithContent
(
rawLocation
,
file
,
content
)
{
const
sourcesArray
=
Object
.
keys
(
sources
)
this
.
lineBreakPositionsByContent
[
file
]
=
this
.
sourceMappingDecoder
.
getLinebreakPositions
(
content
)
if
(
content
===
''
||
(
file
===
0
&&
sourcesArray
.
length
===
1
))
{
// if we don't have ast, we process the only one available content (applicable also for compiler older than 0.4.12)
this
.
lineBreakPositionsByContent
[
file
]
=
this
.
sourceMappingDecoder
.
getLinebreakPositions
(
sources
[
sourcesArray
[
0
]].
content
)
}
else
{
this
.
lineBreakPositionsByContent
[
file
]
=
this
.
sourceMappingDecoder
.
getLinebreakPositions
(
content
)
}
return
this
.
sourceMappingDecoder
.
convertOffsetToLineColumn
(
rawLocation
,
this
.
lineBreakPositionsByContent
[
file
])
return
this
.
sourceMappingDecoder
.
convertOffsetToLineColumn
(
rawLocation
,
this
.
lineBreakPositionsByContent
[
file
])
}
}
...
...
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