Fabian Boehm
a48c787439
Add workaround for Midnight Commander's issue with prompt extraction
...
When we draw the prompt, we move the cursor to the actual
position *we* think it is by issuing a carriage return (via
`move(0,0)`), and then going forward until we hit the spot.
This helps when the terminal and fish disagree on the width of the
prompt, because we are now definitely in the correct place, so we can
only overwrite a bit of the prompt (if it renders longer than we
expected) or leave space after the prompt. Both of these are benign in
comparison to staircase effects we would otherwise get.
Unfortunately, midnight commander ("mc") tries to extract the last
line of the prompt, and does so in a way that is overly naive - it
resets everything to 0 when it sees a `\r`, and doesn't account for
cursor movement. In effect it's playing a terminal, but not committing
to the bit.
Since this has been an open request in mc for quite a while, we hack
around it, by checking the $MC_SID environment variable.
If we see it, we skip the clearing. We end up most likely doing
relative movement from where we think we are, and in most cases it
should be *fine*.
(cherry picked from commit b1b2294390b2a84afdf229d33b3a8bce51ea1a4f)
2023-02-27 22:24:13 +08:00
..
2023-01-21 16:53:59 +01:00
2022-09-26 17:17:17 +02:00
2022-12-10 16:15:03 -08:00
2022-12-10 16:15:03 -08:00
2022-10-28 20:10:09 -07:00
2022-10-28 20:10:09 -07:00
2022-10-28 20:10:09 -07:00
2022-08-20 23:55:18 -07:00
2022-12-31 10:13:03 -08:00
2022-12-31 10:13:03 -08:00
2022-08-27 11:41:29 +02:00
2022-08-21 15:02:19 -07:00
2023-01-14 22:27:16 +01:00
2022-11-29 13:26:32 -06:00
2022-12-10 15:29:04 -08:00
2022-10-26 12:48:31 -05:00
2021-10-01 03:39:43 -07:00
2023-01-14 12:58:20 -08:00
2023-02-27 22:24:13 +08:00
2022-08-22 14:11:52 -07:00
2022-10-28 20:10:09 -07:00
2022-08-20 23:55:18 -07:00
2022-12-30 13:38:47 -08:00
2022-10-15 15:15:04 -05:00
2022-12-17 18:09:54 +01:00
2022-09-20 11:58:37 -07:00
2022-10-08 11:56:38 -05:00
2022-08-20 23:55:18 -07:00
2022-12-10 15:29:03 -08:00
2022-12-10 15:29:03 -08:00
2022-09-13 06:56:52 -07:00
2022-09-12 18:34:19 -07:00
2022-10-28 20:10:09 -07:00
2022-08-20 23:55:18 -07:00
2022-09-20 11:58:37 -07:00
2022-08-21 15:02:19 -07:00
2022-09-20 11:58:37 -07:00
2022-10-27 17:17:05 -07:00
2022-11-28 15:01:12 -08:00
2023-01-14 12:58:20 -08:00
2021-09-21 18:33:14 -07:00
2023-01-09 22:53:34 +01:00
2022-08-21 15:02:19 -07:00
2022-12-10 15:38:46 -08:00
2022-10-29 10:24:42 +02:00
2022-08-20 23:55:18 -07:00
2022-08-20 23:55:18 -07:00
2022-08-20 23:55:18 -07:00
2022-08-20 23:55:18 -07:00
2022-12-10 16:15:00 -08:00
2022-10-26 20:04:04 -07:00
2022-10-26 16:09:02 +02:00
2022-08-21 15:02:19 -07:00
2022-10-16 15:38:11 -05:00
2022-10-28 20:10:09 -07:00
2022-10-26 20:04:04 -07:00
2022-08-20 23:55:18 -07:00
2022-09-20 11:58:37 -07:00
2022-10-28 20:10:09 -07:00
2022-10-16 15:38:11 -05:00
2022-10-16 15:38:11 -05:00
2022-09-20 11:58:37 -07:00
2022-08-20 23:55:18 -07:00
2022-10-28 20:10:09 -07:00
2022-08-21 15:02:19 -07:00
2022-08-20 23:55:18 -07:00
2021-04-21 16:39:29 -07:00
2022-06-19 15:15:17 -07:00
2022-12-10 12:24:43 -08:00
2021-03-28 15:31:25 -07:00
2022-08-20 23:55:18 -07:00
2022-08-21 15:02:19 -07:00
2022-10-28 20:10:09 -07:00
2022-10-28 20:10:09 -07:00
2022-08-20 23:55:18 -07:00
2022-09-20 11:58:37 -07:00
2022-09-20 11:58:37 -07:00
2022-11-12 14:08:22 -08:00
2023-01-13 17:57:04 +01:00
2022-08-21 15:02:19 -07:00
2022-10-26 20:04:04 -07:00
2022-08-20 23:55:18 -07:00
2022-11-15 19:02:30 +01:00
2022-10-28 20:10:09 -07:00
2022-08-20 23:55:18 -07:00
2022-04-09 10:10:44 -07:00
2022-10-28 20:10:09 -07:00
2022-10-28 20:10:09 -07:00
2022-12-10 11:06:54 +01:00
2022-08-20 23:55:18 -07:00
2023-01-08 12:44:02 +01:00
2022-08-20 23:55:18 -07:00
2022-09-20 11:58:37 -07:00
2022-10-08 11:56:38 -05:00
2022-12-30 13:35:33 -08:00
2023-01-23 20:04:43 +01:00
2022-12-10 12:24:43 -08:00
2023-01-17 09:31:04 +01:00
2022-12-10 16:15:00 -08:00
2022-08-21 15:02:19 -07:00
2022-08-20 23:55:18 -07:00
2023-02-27 22:24:13 +08:00
2023-02-27 22:24:13 +08:00
2022-12-19 15:54:23 -08:00
2022-10-28 20:10:09 -07:00
2022-08-21 15:02:19 -07:00
2022-08-21 15:02:19 -07:00
2022-08-30 23:56:33 -07:00
2022-08-20 23:55:18 -07:00
2022-10-26 19:58:40 -07:00
2023-01-01 03:20:01 -08:00
2022-10-26 19:58:40 -07:00
2022-09-20 11:58:37 -07:00
2022-08-20 23:55:18 -07:00
2022-10-28 20:10:09 -07:00
2022-08-21 15:02:19 -07:00
2022-08-20 23:55:18 -07:00
2022-09-20 11:58:37 -07:00
2022-09-20 11:58:37 -07:00
2022-08-20 23:55:18 -07:00
2022-08-21 15:02:19 -07:00
2022-08-20 23:55:18 -07:00
2022-12-29 01:02:44 -08:00
2022-12-10 15:29:03 -08:00
2022-12-11 10:26:39 -08:00
2022-12-04 14:48:20 -08:00
2023-01-16 10:05:01 +01:00
2022-08-20 23:55:18 -07:00
2023-01-16 10:05:01 +01:00
2023-01-16 10:05:01 +01:00