Commit Graph

  • 03d173cbd8 Validate command argument types (string or command list) and give more useful error messages. nicm 2021-08-25 08:51:55 +00:00
  • c6d6af4903 setupterm needs char * not const char * on some platforms. nicm 2021-08-25 07:37:20 +00:00
  • 6ac09aa47c Disable a couple of warnings on macOS. Nicholas Marriott 2021-08-25 08:36:35 +01:00
  • a252fadf8a Fix up some printflike attributes. nicm 2021-08-25 07:09:30 +00:00
  • 78da5a3756 Start inputs as NULL so not freeing random stack garbage, GitHub issue 2852. nicm 2021-08-25 06:36:05 +00:00
  • 7fe3588e49 Merge branch 'obsd-master' into master Thomas Adam 2021-08-23 20:01:09 +01:00
  • 841ce74b43 args_make_commands_now needs to take an extra reference to the returned command list since it will be freed already. nicm 2021-08-23 17:05:43 +00:00
  • 95a374d7d2 Merge branch 'obsd-master' into master Thomas Adam 2021-08-23 16:06:46 +01:00
  • 210e71edf3 Move command argument parsing common functions and don't bother to parse again if given a command rather than a string. nicm 2021-08-23 12:33:55 +00:00
  • 03b83a5a34 Key bindings steal a reference to the command instead of adding their own, it was correct not to add a reference when parsing, but the bind-key then needs to add one. nicm 2021-08-23 11:48:21 +00:00
  • 1f0c0914c7 Revert one of previous, for some reason it is being freed. nicm 2021-08-23 11:08:26 +00:00
  • 4a753dbefc Fix a few memory leaks. nicm 2021-08-23 11:04:21 +00:00
  • 3ed37a2079 Limit width and height to tty correctly, GitHub issue 2843. nicm 2021-08-23 08:17:41 +00:00
  • 1dec1ca146 Merge branch 'obsd-master' into master Thomas Adam 2021-08-22 18:01:18 +01:00
  • bc71e233d9 Fix style regress test. Nicholas Marriott 2021-08-22 16:33:40 +01:00
  • 2e9bafaf14 Fix handling of leading #s when working out width. nicm 2021-08-22 15:33:14 +00:00
  • 03054598df Merge branch 'obsd-master' into master Thomas Adam 2021-08-22 16:01:19 +01:00
  • 72d905f32c Do not double free expanded path in source-file, also remove some unnecessary assignments. nicm 2021-08-22 13:48:29 +00:00
  • c0048d6d20 Insert alias in the right place, GitHub issue 2842. nicm 2021-08-22 13:00:28 +00:00
  • 324f87cf14 Merge branch 'obsd-master' into master Thomas Adam 2021-08-22 12:08:05 +01:00
  • 0084cbef5a Free value properly. nicm 2021-08-21 20:57:52 +00:00
  • 069f5925af Preserve argument type in command and convert to string on demand. nicm 2021-08-21 20:46:43 +00:00
  • 921991c98d Merge branch 'obsd-master' into master Thomas Adam 2021-08-21 20:01:22 +01:00
  • 326d2ef234 Pass typed arguments out of the parser into the arguments list and let it convert them into strings. nicm 2021-08-21 18:39:07 +00:00
  • 63b6eec278 Use new syntax for default key bindings. nicm 2021-08-21 17:41:19 +00:00
  • 5241dae87d Stop caring about empty commands, just treat as a null command. nicm 2021-08-21 17:25:32 +00:00
  • 4d3367e965 Merge branch 'obsd-master' into master Thomas Adam 2021-08-21 16:01:26 +01:00
  • 68cacaec68 Remove some members of struct cmd which are no longer used. nicm 2021-08-21 14:10:08 +00:00
  • c286fbdcd7 Preserve command group when moving temporary list to current list being buit. nicm 2021-08-21 14:06:17 +00:00
  • 62036121fa Merge branch 'obsd-master' into master Thomas Adam 2021-08-21 12:01:41 +01:00
  • 110ba767e5 Rename a member to match what it will be in future. nicm 2021-08-21 10:28:05 +00:00
  • 08e6360f23 Add args parsing callback for some future work, currently unused. nicm 2021-08-21 10:22:38 +00:00
  • d371764d02 Wrap command argument definitions in their own struct. nicm 2021-08-21 08:44:59 +00:00
  • b0da0cee4d Merge branch 'obsd-master' into master Thomas Adam 2021-08-20 22:01:46 +01:00
  • d589be6c65 A couple more spacing fixes. nicm 2021-08-20 20:08:30 +00:00
  • caa8703a23 Spacing tweaks. nicm 2021-08-20 20:04:22 +00:00
  • 5f32b7d961 Hide struct args behind a couple of accessor functions. nicm 2021-08-20 19:50:16 +00:00
  • de94a344f6 Add a couple of const and fix some warnings. nicm 2021-08-20 19:34:51 +00:00
  • c76b28de24 Remove some unnecessary blank lines. nicm 2021-08-20 19:08:36 +00:00
  • 944fde7c57 Merge branch 'obsd-master' into master Thomas Adam 2021-08-20 20:01:27 +01:00
  • 90dd474c3e Expose args_value struct (will be needed soon) and add some missing frees. nicm 2021-08-20 18:59:53 +00:00
  • 6cbc83c6a6 Add a way to create an empty arguments set. nicm 2021-08-20 17:53:54 +00:00
  • e463e8622d Remove stray spaces after function names. nicm 2021-08-20 17:50:42 +00:00
  • 01b13de655 Fill colour palette correctly from option for new panes, GitHub issue 2831. nicm 2021-08-20 17:36:03 +00:00
  • 41822ef782 Regress fixes. Nicholas Marriott 2021-08-20 18:20:49 +01:00
  • 5ed5b11b45 Add zeraphel complex binding to regress. Nicholas Marriott 2021-08-20 14:33:57 +01:00
  • 84955e3d62 Merge branch 'obsd-master' into master Thomas Adam 2021-08-20 12:01:15 +01:00
  • f984446d19 Actually parse contents of {} as a command and then convert to a string instead of just copying arguments around as strings. nicm 2021-08-20 09:06:26 +00:00
  • 0f02fecd95 Merge branch 'obsd-master' into master Thomas Adam 2021-08-20 10:01:21 +01:00
  • 28d26fca35 Update a regress conf for new syntax. Nicholas Marriott 2021-08-20 07:58:25 +01:00
  • 3676779156 Fix format test for new behaviour. Nicholas Marriott 2021-08-18 11:20:22 +01:00
  • 3177d7b617 Add a helper function for actually parsing the command. nicm 2021-08-20 06:30:57 +00:00
  • 551bafc18d Merge branch 'obsd-master' into master Thomas Adam 2021-08-18 20:01:17 +01:00
  • 5413a73ded Need to flatten arguments for aliases. nicm 2021-08-18 15:16:33 +00:00
  • c587ad027f Merge branch 'obsd-master' into master Thomas Adam 2021-08-18 12:01:19 +01:00
  • 82836c7394 Push the conversion of {} to string up out of the parser and into the command builder. nicm 2021-08-18 10:15:08 +00:00
  • a8be47f0f4 Merge branch 'obsd-master' into master Thomas Adam 2021-08-17 22:01:18 +01:00
  • 5fdea440ce Treat a pane that has died the same as no pane when sending data to control mode clients, GitHub issue 2828. nicm 2021-08-17 20:17:21 +00:00
  • 66aaa9e484 Fix pipe-pane usage. nicm 2021-08-17 19:37:55 +00:00
  • 2b0d798982 Do not block with incremental command prompt. nicm 2021-08-17 19:26:42 +00:00
  • bacae4b4ad Merge branch 'obsd-master' into master Thomas Adam 2021-08-17 18:01:16 +01:00
  • 4f62aadc93 Set the right session if detach-on-destroy is off. nicm 2021-08-17 16:19:00 +00:00
  • 7869ec87e0 Merge branch 'obsd-master' into master Thomas Adam 2021-08-17 14:01:16 +01:00
  • de9697b456 calloc for confirm-before data since the item needs to start NULL. nicm 2021-08-17 11:20:13 +00:00
  • 0dad8dd982 Merge branch 'obsd-master' into master Thomas Adam 2021-08-17 10:01:19 +01:00
  • 41ababdf6c Be more sophisticated about enabling synchronized updates when there is an overlay and treat it like the active pane (use for commands which move the cursor only). When there is an overlay also use it for all panes and not just the active pane. GitHub issue 2826. nicm 2021-08-17 08:44:52 +00:00
  • 1a7eb6ca90 Revert previous; this is not how it should work. nicm 2021-08-17 08:22:44 +00:00
  • 158f0e8c41 Start sync before drawing popup. nicm 2021-08-17 07:14:33 +00:00
  • f2d4a1f022 Needs fcntl.h. Nicholas Marriott 2021-08-16 13:51:55 +01:00
  • 21ce1e04fe Fuzzer needs some other bits it seems. Nicholas Marriott 2021-08-14 22:30:20 +01:00
  • c1be1b351d Minor cleanups, GitHub issue 2824. Nicholas Marriott 2021-08-14 18:33:13 +01:00
  • 22e5fc02c3 Merge branch 'obsd-master' into master Thomas Adam 2021-08-14 18:01:17 +01:00
  • 30786abe0e Some other missing palette NULL checks, from oss-fuzz. nicm 2021-08-14 16:26:29 +00:00
  • 3f8954b11b Merge branch 'obsd-master' into master Thomas Adam 2021-08-14 16:01:17 +01:00
  • befe7cb1c5 Do not use NULL palette when clearing. nicm 2021-08-14 14:00:07 +00:00
  • 65a539c02e Merge branch 'obsd-master' into master Thomas Adam 2021-08-14 10:01:18 +01:00
  • 4cc6db7281 Missing argument specifier for -c. nicm 2021-08-14 08:06:37 +00:00
  • 79f075bf1b Merge branch 'obsd-master' into master Thomas Adam 2021-08-14 01:35:27 +01:00
  • 54773d23b5 Merge branch 'obsd-master' into master Thomas Adam 2021-08-14 01:34:54 +01:00
  • 7d7d7c9605 Tweak how mouse works on popup: only Meta alone resizes or moves, not Meta with other modifiers; button 2 on the left or top border opens menu, right or bottom resizes; button 1 on any border moves. nicm 2021-08-13 23:05:40 +00:00
  • 63aa968642 Check callback needs to only return 0 (text should be suppressed) if menu returns 0, otherwise it should check the popup also. nicm 2021-08-13 20:04:45 +00:00
  • 7a0cec5ecf Fill in some other bits on new panes. nicm 2021-08-13 19:55:11 +00:00
  • 2588c3e52e Add menu options to convert a popup into a pane. nicm 2021-08-13 19:27:25 +00:00
  • 92615b534a Adjust overlay check callback before drawing data from pty. nicm 2021-08-13 19:25:24 +00:00
  • 7789639b5d Add a menu when a popup is present (mouse only for now). nicm 2021-08-13 18:54:54 +00:00
  • 614611a8bd Add -B flag to remove border from popup. nicm 2021-08-13 17:03:29 +00:00
  • 4c07367bfe Fix fuzzer wrapper. Nicholas Marriott 2021-08-13 13:45:45 +01:00
  • 13a0da205b Break message type stuff out into its own header. nicm 2021-08-13 07:37:58 +00:00
  • 2bb0b9d6c5 Change focus to be driven by events rather than walking all panes at end of event loop, this way the ordering of in and out can be enforced. GitHub issue 2808. nicm 2021-08-13 06:52:51 +00:00
  • a2b8506917 Set return code for confirm-before and make command-prompt also block, GitHub issue 2822. nicm 2021-08-13 06:50:42 +00:00
  • f725f9bc8a Merge branch 'obsd-master' into master Thomas Adam 2021-08-13 00:01:19 +01:00
  • 94d96c6179 Merge branch 'obsd-master' into master Thomas Adam 2021-08-12 22:01:22 +01:00
  • e2f6f58fe5 Make newline a style delimiter as well so they can cross multiple lines for readability. nicm 2021-08-12 20:46:30 +00:00
  • db9195463d Now that styles can contain formats, they need to be expanded when inserted into the status line. nicm 2021-08-12 20:44:49 +00:00
  • 6feb8f6505 Use COLOUR_DEFAULT not hardcoded 8. nicm 2021-08-12 20:09:34 +00:00
  • 9b00472820 Evaluate styles with the pane variables. nicm 2021-08-12 19:47:05 +00:00
  • 9d7b1960c2 Merge branch 'obsd-master' into master Thomas Adam 2021-08-12 14:01:18 +01:00
  • 5d451551b6 Restore saved cursor position after a ZWJ rather than recalculating it. nicm 2021-08-12 11:35:53 +00:00
  • fada3eb932 Merge branch 'obsd-master' into master Thomas Adam 2021-08-12 10:01:22 +01:00
  • 26773ea9ef Do not dereference pane when it is NULL, fixes a crash when creating a hook from the config, GitHub issue 2820. nicm 2021-08-12 08:10:20 +00:00