Commit 3811fbff authored by Phil Hughes's avatar Phil Hughes

reset hash when changing files

[ci skip]
parent 5c0c345a
...@@ -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,
......
...@@ -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) => {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment