From 835528573633ebfc2c023dcfc8c6a622e7238fe1 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Mon, 2 Mar 2020 18:22:18 -0800 Subject: [PATCH] Add a category for screen repainting --- src/flog.h | 2 ++ src/screen.cpp | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/flog.h b/src/flog.h index 41efc5cbd..9e9c763f6 100644 --- a/src/flog.h +++ b/src/flog.h @@ -103,6 +103,8 @@ class category_list_t { category_t reader{L"reader", L"The interactive reader/input system"}; category_t complete{L"complete", L"The completion system"}; category_t path{L"path", L"Searching/using paths"}; + + category_t screen{L"screen", L"Screen repaints"}; }; /// The class responsible for logging. diff --git a/src/screen.cpp b/src/screen.cpp index 908591bf4..8a5ee83d4 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -1000,6 +1000,8 @@ void s_write(screen_t *s, const wcstring &left_prompt, const wcstring &right_pro const wcstring &commandline, size_t explicit_len, const std::vector &colors, const std::vector &indent, size_t cursor_pos, const page_rendering_t &pager, bool cursor_is_within_pager) { + static relaxed_atomic_t s_repaints{0}; + FLOGF(screen, "Repaint %u", (unsigned)++s_repaints); screen_data_t::cursor_t cursor_arr; // Turn the command line into the explicit portion and the autosuggestion.