Skip to content

Commit

Permalink
[memory] shorten cells too wide to fit in prompt
Browse files Browse the repository at this point in the history
  • Loading branch information
midichef committed Feb 2, 2024
1 parent 9828154 commit 3bb3274
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion visidata/memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ def memosSheet(vd):


Sheet.addCommand('Alt+Shift+M', 'open-memos', 'vd.push(vd.memosSheet)', 'open the Memory Sheet')
Sheet.addCommand('Alt+m', 'memo-cell', r'vd.memory[input("assign \""+cursorCol.getDisplayValue(cursorRow)+"\" to: ")] = cursorCol.getTypedValue(cursorRow)', 'store value in current cell in Memory Sheet')
Sheet.addCommand('Alt+m', 'memo-cell', r'w = min(vd.options.default_width, windowWidth-len("assign \"\" to: ")-1)-1; dv = cursorCol.getDisplayValue(cursorRow); dv = dv[:w-dispwidth(options.disp_truncator)] + options.disp_truncator if dispwidth(dv) > w else dv[:w]; vd.memory[input("assign \""+dv+"\" to: ")] = cursorCol.getTypedValue(cursorRow)', 'store value in current cell in Memory Sheet')

0 comments on commit 3bb3274

Please sign in to comment.