From b96374b7ca2c5609da999cc60df4dc7938da8320 Mon Sep 17 00:00:00 2001 From: Alex Daily Date: Sat, 5 Nov 2022 22:51:45 +0100 Subject: [PATCH 1/7] wq and report msgs --- package.json | 1 + src/components/Vi.svelte | 12 ++++++++ src/lib/vi/index.ts | 3 ++ src/lib/vi/utils.ts | 62 +++++++++++++++++++++++++++++++--------- src/types/app.ts | 2 ++ yarn.lock | 2 +- 6 files changed, 67 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index caeb790..3a14d83 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "@testing-library/svelte": "^3.2.2", "@tsconfig/svelte": "^3.0.0", "@types/jest": "^29.2.0", + "@types/node": "^18.11.9", "@typescript-eslint/eslint-plugin": "^5.40.0", "@typescript-eslint/parser": "^5.40.0", "babel-jest": "^29.2.2", diff --git a/src/components/Vi.svelte b/src/components/Vi.svelte index 4a5f939..f3c9c71 100644 --- a/src/components/Vi.svelte +++ b/src/components/Vi.svelte @@ -5,6 +5,14 @@ width: 100%; } + .message { + position: fixed; + bottom: 28px; + width: 100%; + background-color: red; + color: white; + } + .buffer { display: block; } @@ -33,6 +41,7 @@ let { MODE, COMMAND_LINE, + MESSAGE, COORDS: { x, y }, BUFFER: { BUFFER_PRE, LINE, BUFFER_POST }, } = STATE as ViState @@ -51,6 +60,9 @@
{BUFFER_PRE.length + 2 + index} {line}
{/each} + {#if !!MESSAGE} +
{MESSAGE}
+ {/if}