commit 987d9c885908e59047d2577404e6d7d058f349a2 from: Omar Polo date: Thu Jul 15 18:43:34 2021 UTC add toggle-pre-wrap commit - 88693f6126f7d090cc8e35aeb8f3abe9034542bd commit + 987d9c885908e59047d2577404e6d7d058f349a2 blob - 04719d6ddbc8a30129f219162e953096a09910d2 blob + 3b54f026257056a0568ede3bcaa8ce672222cdb5 --- ChangeLog +++ ChangeLog @@ -1,5 +1,7 @@ 2021-07-15 Omar Polo + * cmd.c (cmd_toggle_pre_wrap): add toggle-pre-wrap + * defaults.c (load_default_keys): bind C-z to suspend-telescope (load_default_keys): bind / to move-beginning/end-of-line (config_setvari): add dont-wrap-pre blob - e4b79d77d4acac692396bbeda69607b0571807bf blob + 728c4662141cb8c65e3e191d6145497614cba594 --- cmd.c +++ cmd.c @@ -848,3 +848,16 @@ cmd_suspend_telescope(struct buffer *buffer) message("Zzz..."); ui_suspend(); } + +void +cmd_toggle_pre_wrap(struct buffer *buffer) +{ + dont_wrap_pre = !dont_wrap_pre; + + if (dont_wrap_pre) + message("Don't wrap preformatted blocks"); + else + message("Wrap preformatted blocks"); + + ui_schedule_redraw(); +} blob - ae85dbc7afa4f76e0d67106c23c4ec2d77b26fa6 blob + d5cb5c9108fa38b7dbc792b5ffcbba5d36abe741 --- cmd.h +++ cmd.h @@ -60,6 +60,7 @@ CMD(cmd_tab_previous); CMD(cmd_tab_select); CMD(cmd_toc); CMD(cmd_toggle_help); +CMD(cmd_toggle_pre_wrap); DEFALIAS(q, cmd_kill_telescope) DEFALIAS(tabn, cmd_tab_next) blob - a93c9a0e3c6d3dbe852563cb301d7d7b8673975a blob + a65ef42cbde677852e5336b7fcc943a2e48c77b4 --- telescope.1 +++ telescope.1 @@ -493,6 +493,8 @@ Select and jump to a heading of the page using the min .It Ic toggle-help Toggle side window with help about available keys and their associated interactive command. +.It Ic toggle-pre-wrap +Toggle the wrapping of preformatted blocks. .El .Ss Minibuffer commands .Bl -tag -width execute-extended-command -compact