Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

opencode-vim

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opencode-vim - npm Package Compare versions

Comparing version
0.0.14
to
0.0.15
+1
-1
package.json
{
"name": "opencode-vim",
"version": "0.0.14",
"version": "0.0.15",
"exports": {

@@ -5,0 +5,0 @@ "./tui": {

@@ -159,3 +159,3 @@ /** @jsxImportSource @opentui/solid */

if (!isPromptFocused(ctx)) return navigationKey(key)
if (!isSlashCommandToken(ctx)) return undefined
if (!isNativeCompletionToken(ctx)) return undefined
if (key === "j") return arrowKey("down", "\u001B[B")

@@ -170,8 +170,8 @@ if (key === "k") return arrowKey("up", "\u001B[A")

function isSlashCommandToken(ctx: PromptContext) {
function isNativeCompletionToken(ctx: PromptContext) {
const text = ctx.prompt()?.current.input ?? focusedInput(ctx)?.plainText ?? ""
if (!text.startsWith("/")) return false
const input = focusedInput(ctx)
const offset = Math.max(0, input?.cursorOffset ?? text.length)
return !/\s/.test(text.slice(0, Math.min(offset + 1, text.length)))
const beforeCursor = text.slice(0, Math.min(offset + 1, text.length))
return /^\/\S*$/.test(beforeCursor) || /(?:^|\s)@\S*$/.test(beforeCursor)
}

@@ -178,0 +178,0 @@