various fixes found during review
This commit is contained in:
@@ -499,3 +499,19 @@ def test_status_hints_follow_the_mode():
|
||||
assert "J K branch" in hints and "L pull" in hints and "s / S" not in hints
|
||||
render.init_view(view, state.MODE_BRANCHES)
|
||||
assert view.status[render.STATUS_KEY] == hints and view.settings().get(state.MODE_SETTING) == "branches"
|
||||
|
||||
|
||||
def test_all_files_view_tokenises_only_once_the_colours_can_show(monkeypatch):
|
||||
calls = []
|
||||
monkeypatch.setattr(render, "_all_colours", lambda view, st, paths: calls.append(list(paths)))
|
||||
st = make_state()
|
||||
st.all_mode = True
|
||||
st.files = [st.change]
|
||||
st.all_diffs = {st.change.path: (st.lines, st.blocks, False)}
|
||||
view = sublime.View()
|
||||
render.init_view(view)
|
||||
# before the restart that loads the scheme rules the colours could not be painted: no tokenising
|
||||
render.render_all(view, st)
|
||||
assert calls == []
|
||||
render.render_all(with_loaded_override(view), st)
|
||||
assert calls == [[st.change.path]]
|
||||
|
||||
Reference in New Issue
Block a user