Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
3811fbff
Commit
3811fbff
authored
Oct 26, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
reset hash when changing files
[ci skip]
parent
5c0c345a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
2 deletions
+3
-2
app/assets/javascripts/repo/components/repo_preview.vue
app/assets/javascripts/repo/components/repo_preview.vue
+0
-2
app/assets/javascripts/repo/stores/actions/file.js
app/assets/javascripts/repo/stores/actions/file.js
+3
-0
No files found.
app/assets/javascripts/repo/components/repo_preview.vue
View file @
3811fbff
...
@@ -15,8 +15,6 @@ export default {
...
@@ -15,8 +15,6 @@ export default {
},
},
mounted
()
{
mounted
()
{
this
.
highlightFile
();
this
.
highlightFile
();
// TODO: get this to work across different files
this
.
lineHighlighter
=
new
LineHighlighter
({
this
.
lineHighlighter
=
new
LineHighlighter
({
fileHolderSelector
:
'
.blob-viewer-container
'
,
fileHolderSelector
:
'
.blob-viewer-container
'
,
scrollFileHolder
:
true
,
scrollFileHolder
:
true
,
...
...
app/assets/javascripts/repo/stores/actions/file.js
View file @
3811fbff
...
@@ -39,6 +39,9 @@ export const setFileActive = ({ commit, state, getters, dispatch }, file) => {
...
@@ -39,6 +39,9 @@ export const setFileActive = ({ commit, state, getters, dispatch }, file) => {
commit
(
types
.
SET_FILE_ACTIVE
,
{
file
,
active
:
true
});
commit
(
types
.
SET_FILE_ACTIVE
,
{
file
,
active
:
true
});
dispatch
(
'
scrollToTab
'
);
dispatch
(
'
scrollToTab
'
);
// reset hash for line highlighting
location
.
hash
=
''
;
};
};
export
const
getFileData
=
({
state
,
commit
,
dispatch
},
file
)
=>
{
export
const
getFileData
=
({
state
,
commit
,
dispatch
},
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