Debug print statements left in list_mappings()?

8 views
Skip to first unread message

Gary Johnson

unread,
Mar 20, 2023, 12:36:43 PM3/20/23
to vim...@googlegroups.com
There seem to be a couple of debug print statements left in
list_mappings() in map.c, so that when I execute

:verbose abbreviate dt

(I have an abbreviation "dt"), I see at the top of the output:

Seen modifyOtherKeys: true
Kitty keyboard protocol: Cleared

I discovered that these were added here:

patch 9.0.0794: there is no way to find out if modifyOtherKeys has been seen
patch 9.0.0930: cannot debug the Kitty keyboard protocol with TermDebug

It seems to me that these are for debugging and have nothing to do
with where abbreviations are defined. They just add clutter to the
output of ":verbose abbreviate" and should be queried some other
way or enabled only for such debugging.

Regards,
Gary

Bram Moolenaar

unread,
Mar 20, 2023, 6:15:07 PM3/20/23
to vim...@googlegroups.com, Gary Johnson
These were added intentionally. There is no other way to check if
modifyOtherKeys or Kitty keyboard protocol is active. This matters for
mappings, that is why it was added here. Without one of these active
you can't tell the difference between CTRL-I and Tab. Whether you call
this debugging or not is a matter of taste, it does influence the
working of mappings.

The informaiton could be moved elsewhere, but I don't know a better
place. It could be skipped for abbreviations, but it probably doesn't
help much.

If you know a better place to make this information available, let us
know.

--
GALAHAD: No, please. Please! I can defeat them! There's only a hundred.
GIRLS: He will beat us easily. We haven't a chance.
"Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages