Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

git-jump

Package Overview
Dependencies
Maintainers
1
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-jump - npm Package Compare versions

Comparing version 0.1.8 to 0.1.9

31

dist/index.js

@@ -293,2 +293,5 @@ "use strict";

const quickSelectLines = getQuickSelectLines(state.list);
if (quickSelectLines.length === 0) {
return line;
}
line += viewQuickSelectHint(quickSelectLines.length - 1, hintColumnWidth);

@@ -354,5 +357,7 @@ return line;

const DOWN = Buffer.from('1b5b42', 'hex');
const RIGHT = Buffer.from('1b5b43', 'hex');
const LEFT = Buffer.from('1b5b44', 'hex');
const DELETE = Buffer.from('7f', 'hex');
const BACKSPACE = Buffer.from('08', 'hex');
const ENTER = Buffer.from('0d', 'hex');
const SPACE = Buffer.from('20', 'hex');
function log(s) {

@@ -602,2 +607,18 @@ fs_1.appendFileSync('./log', Buffer.from(`${JSON.stringify(s)}\n`));

}
if (key.equals(RIGHT)) {
if (state.searchStringCursorPosition === state.searchString.length) {
return;
}
state.searchStringCursorPosition += 1;
view(state);
return;
}
if (key.equals(LEFT)) {
if (state.searchStringCursorPosition === 0) {
return;
}
state.searchStringCursorPosition -= 1;
view(state);
return;
}
if (key.equals(DOWN)) {

@@ -608,7 +629,7 @@ state.highlightedLineIndex = Math.min(state.list.length - 1, state.highlightedLineIndex + 1);

}
if (key.equals(DELETE)) {
if (state.searchString.length === 0) {
if (key.equals(DELETE) || key.equals(BACKSPACE)) {
if (state.searchStringCursorPosition === 0) {
return;
}
state.searchString = state.searchString.slice(0, state.searchString.length - 1);
state.searchString = state.searchString.substring(0, state.searchStringCursorPosition - 1) + state.searchString.substring(state.searchStringCursorPosition, state.searchString.length);
state.searchStringCursorPosition -= 1;

@@ -631,3 +652,3 @@ state.list = generateList(state);

const inputString = key.toString();
state.searchString += inputString;
state.searchString = state.searchString.substring(0, state.searchStringCursorPosition) + inputString + state.searchString.substring(state.searchStringCursorPosition, state.searchString.length);
state.searchStringCursorPosition += inputString.length;

@@ -634,0 +655,0 @@ state.list = generateList(state);

2

package.json
{
"name": "git-jump",
"version": "0.1.8",
"version": "0.1.9",
"description": "Git Branches Helper",

@@ -5,0 +5,0 @@ "scripts": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc