Avoid line numbers on select
dougg0k opened this issue · 3 comments
dougg0k commented
Hi,
Would it be possible to enable a flag or even implement something to make the line numbers or lines around not selectable (only the content) while having them enabled? obviously.
eth-p commented
Text selection (and copying) is handled by the terminal emulator. Unfortunately, I'm not aware of any ANSI escape sequences that tell the terminal to make certain regions of text unselectable.
If you use tmux
, you could use its rectangle selection mode to avoid selecting the line numbers:
After pressing the copy keybind, this is what was in my clipboard:
use std::fmt;
use std::io;
use std::vec::Vec;
use nu_ansi_term::Color::{Fixed, Green, Red, Yellow};
use nu_ansi_term::Style;
use bytesize::ByteSize;
use syntect::easy::HighlightLines;
use syntect::highlighting::Color;
use syntect::highlighting::Theme;
use syntect::parsing::SyntaxSet;
use content_inspector::ContentType;
use encoding_rs::{UTF_16BE, UTF_16LE};
use unicode_width::UnicodeWidthChar;
use crate::assets::{HighlightingAssets, SyntaxReferenceInSet};
use crate::config::Config;
#[cfg(feature = "git")]
dougg0k commented
I currently use alacritty, zellij and nushell
dougg0k commented
It seems that there were an implementation, but doesnt seem to work. Unless something else could be interfering.
Nevermind, you need to hold Ctrl+Shift
and select.