Commit 945014f5 authored by Kai Willadsen's avatar Kai Willadsen

filediff: Fix sensitivity setting for missing chunks

The previous "is not None" logic existed so that we didn't get e.g.,
None out of the logical shortcut. We need a boolean here, so we'll just
do that instead.
parent 8ebcdf7b
Pipeline #1786 failed with stages
......@@ -435,10 +435,10 @@ class FileDiff(MeldDoc, Component):
chunk2 = None
if self.num_panes == 3:
chunk2 = self.linediffer.get_chunk(chunk_id, 1, 2)
left_mid_exists = chunk0 and chunk0[1] != chunk0[2]
left_exists = chunk0 and chunk0[3] != chunk0[4]
right_mid_exists = chunk2 and chunk2[1] != chunk2[2]
right_exists = chunk2 and chunk2[3] != chunk2[4]
left_mid_exists = bool(chunk0 and chunk0[1] != chunk0[2])
left_exists = bool(chunk0 and chunk0[3] != chunk0[4])
right_mid_exists = bool(chunk2 and chunk2[1] != chunk2[2])
right_exists = bool(chunk2 and chunk2[3] != chunk2[4])
push_left = editable_left
push_right = editable_right
pull_left = editable and left_exists
......
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