Skip to content

Commit d77d85b

Browse files
Felix Holmgrenbrotherbard
authored andcommitted
Make the context slider work again
1 parent 18725fd commit d77d85b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

html/views/commit/commit.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/* Commit: Interface for selecting, staging, discarding, and unstaging
22
hunks, individual lines, or ranges of lines. */
33

4-
var contextLines = 5;
4+
var contextLines = 0;
55

66
var showNewFile = function(file)
77
{
@@ -39,6 +39,7 @@ var setTitle = function(status) {
3939
var displayContext = function() {
4040
$("contextSize").style.display = "";
4141
$("contextTitle").style.display = "";
42+
contextLines = $("contextSize").value;
4243
}
4344

4445
var showFileChanges = function(file, cached) {
@@ -51,7 +52,8 @@ var showFileChanges = function(file, cached) {
5152
hideState();
5253

5354
$("contextSize").oninput = function(element) {
54-
contextSize = $("contextSize").value;
55+
contextLines = $("contextSize").value;
56+
Controller.refresh();
5557
}
5658

5759
if (file.status == 0) // New file?

0 commit comments

Comments
 (0)