Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
saitonakamura committed Dec 28, 2022
1 parent 7bb6c51 commit c507878
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions src/bridge/clipboard.rs
Expand Up @@ -11,7 +11,6 @@ pub fn get_clipboard_contents(format: Option<&str>) -> Result<Value, Box<dyn Err
let lines = if let Some("dos") = format {
// Add \r to lines if current file format is dos.
clipboard_raw.replace('\n', "\r\n")
// clipboard_raw
} else {
// Else, \r is stripped, leaving only \n.
clipboard_raw
Expand All @@ -27,8 +26,7 @@ pub fn get_clipboard_contents(format: Option<&str>) -> Result<Value, Box<dyn Err
let paste_mode = Value::from(if is_line_paste { "V" } else { "v" });

// Return [content: [String], paste_mode: v or V]
let x = Value::from(vec![lines, paste_mode]);
Ok(x)
Ok(Value::from(vec![lines, paste_mode]))
}

pub fn set_clipboard_contents(value: &Value) -> Result<Value, Box<dyn Error + Send + Sync>> {
Expand Down
2 changes: 1 addition & 1 deletion src/bridge/setup.rs
Expand Up @@ -7,7 +7,7 @@ use crate::{bridge::TxWrapper, error_handling::ResultPanicExplanation};
const REGISTER_CLIPBOARD_PROVIDER_LUA: &str = r"
local function set_clipboard(register)
return function(lines, regtype)
vim.rpcrequest(vim.g.neovide_channel_id, 'neovide.set_clipboard', lines, regtype)
vim.rpcrequest(vim.g.neovide_channel_id, 'neovide.set_clipboard', lines)
end
end
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Expand Up @@ -173,7 +173,7 @@ pub fn init_logger() {
let settings = SETTINGS.get::<CmdLineSettings>();

let logger = if settings.log_to_file {
Logger::try_with_env_or_str("neovide=debug")
Logger::try_with_env_or_str("neovide")
.expect("Could not init logger")
.log_to_file(FileSpec::default())
.rotate(
Expand Down

0 comments on commit c507878

Please sign in to comment.