From 229d84bd2d8d88c407e212ff48198de70f5f54b1 Mon Sep 17 00:00:00 2001 From: CismonX Date: Wed, 2 Feb 2022 14:53:46 +0800 Subject: [PATCH] bugfix: snippet completion for block commands --- CHANGELOG.md | 14 +++++++++----- package-lock.json | 4 ++-- package.json | 4 ++-- src/providers/completion_item.ts | 4 ++-- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cf2400a..6b9ee9e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,13 +1,17 @@ # Changelog +## v0.2.4 - 02/02/2022 + +* Fix a bug which breaks the snippet completion of block commands. + ## v0.2.3 - 10/23/2021 * Fix a bug which prevents diagnostic info from displaying correctly in GNU Texinfo 6.8, and on Windows platform. diff --git a/package-lock.json b/package-lock.json index 7b66ac5..cc324e2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "_copyrightNotice": [ - "Copyright (C) 2020,2021 CismonX ", + "Copyright (C) 2020,2021,2022 CismonX ", "Copying and distribution of this file, with or without modification,", "are permitted in any medium without royalty, provided the copyright notice and this notice are preserved.", "This file is offered as-is, without any warranty." ], "name": "texinfo", - "version": "0.2.3", + "version": "0.2.4", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 5aea112..d89840f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "_copyrightNotice": [ - "Copyright (C) 2020,2021 CismonX ", + "Copyright (C) 2020,2021,2022 CismonX ", "Copying and distribution of this file, with or without modification,", "are permitted in any medium without royalty, provided the copyright notice and this notice are preserved.", "This file is offered as-is, without any warranty." @@ -9,7 +9,7 @@ "displayName": "Texinfo Language Support", "description": "Texinfo language support for Visual Studio Code", "publisher": "cismonx", - "version": "0.2.3", + "version": "0.2.4", "author": { "name": "CismonX", "email": "admin@cismon.net", diff --git a/src/providers/completion_item.ts b/src/providers/completion_item.ts index eeef2a1..c2d4c28 100644 --- a/src/providers/completion_item.ts +++ b/src/providers/completion_item.ts @@ -1,7 +1,7 @@ /** * providers/completion_item.ts * - * Copyright (C) 2020,2021 CismonX + * Copyright (C) 2020,2021,2022 CismonX * * This file is part of vscode-texinfo. * @@ -1351,7 +1351,7 @@ function blockSnippet(name: string, detail: string, ...args: string[]) { .join(' '); return snippet(name, name, detail, 0, `@${name} ${args.join(' ')}\n\n@end ${name}`, - name + args.length ? ' ' : '' + argsIndexed + + name + (args.length ? ' ' : '') + argsIndexed + `\n$${args.length + 1}\n@end ${name}` ); }