mirror of https://github.com/helix-editor/helix
address warnings
parent
2fe135cf7d
commit
c1b5ff2305
|
@ -3160,6 +3160,7 @@ fn file_explorer_in_current_directory(cx: &mut Context) {
|
||||||
fn buffer_picker(cx: &mut Context) {
|
fn buffer_picker(cx: &mut Context) {
|
||||||
let current = view!(cx.editor).doc;
|
let current = view!(cx.editor).doc;
|
||||||
|
|
||||||
|
#[allow(unused)]
|
||||||
struct BufferMeta {
|
struct BufferMeta {
|
||||||
id: DocumentId,
|
id: DocumentId,
|
||||||
path: Option<PathBuf>,
|
path: Option<PathBuf>,
|
||||||
|
|
|
@ -188,7 +188,7 @@ where
|
||||||
res
|
res
|
||||||
}
|
}
|
||||||
|
|
||||||
pub static BUFFER_EXTENSION_KEYMAP: Lazy<RwLock<BufferExtensionKeyMap>> = Lazy::new(|| {
|
static BUFFER_EXTENSION_KEYMAP: Lazy<RwLock<BufferExtensionKeyMap>> = Lazy::new(|| {
|
||||||
RwLock::new(BufferExtensionKeyMap {
|
RwLock::new(BufferExtensionKeyMap {
|
||||||
map: HashMap::new(),
|
map: HashMap::new(),
|
||||||
reverse: HashMap::new(),
|
reverse: HashMap::new(),
|
||||||
|
|
|
@ -3,7 +3,7 @@ use std::cmp::min;
|
||||||
use helix_core::doc_formatter::{DocumentFormatter, GraphemeSource, TextFormat};
|
use helix_core::doc_formatter::{DocumentFormatter, GraphemeSource, TextFormat};
|
||||||
use helix_core::graphemes::Grapheme;
|
use helix_core::graphemes::Grapheme;
|
||||||
use helix_core::str_utils::char_to_byte_idx;
|
use helix_core::str_utils::char_to_byte_idx;
|
||||||
use helix_core::syntax::{self, Highlight, HighlightEvent, Highlighter, OverlayHighlights};
|
use helix_core::syntax::{self, HighlightEvent, Highlighter, OverlayHighlights};
|
||||||
use helix_core::text_annotations::TextAnnotations;
|
use helix_core::text_annotations::TextAnnotations;
|
||||||
use helix_core::{visual_offset_from_block, Position, RopeSlice};
|
use helix_core::{visual_offset_from_block, Position, RopeSlice};
|
||||||
use helix_stdx::rope::RopeSliceExt;
|
use helix_stdx::rope::RopeSliceExt;
|
||||||
|
|
|
@ -2,8 +2,7 @@ use crate::{
|
||||||
annotations::diagnostics::{DiagnosticFilter, InlineDiagnosticsConfig},
|
annotations::diagnostics::{DiagnosticFilter, InlineDiagnosticsConfig},
|
||||||
clipboard::ClipboardProvider,
|
clipboard::ClipboardProvider,
|
||||||
document::{
|
document::{
|
||||||
DocumentOpenError, DocumentSavedEvent, DocumentSavedEventFuture, DocumentSavedEventResult,
|
DocumentOpenError, DocumentSavedEventFuture, DocumentSavedEventResult, Mode, SavePoint,
|
||||||
Mode, SavePoint,
|
|
||||||
},
|
},
|
||||||
events::{DocumentDidClose, DocumentDidOpen, DocumentFocusLost, DocumentSaved},
|
events::{DocumentDidClose, DocumentDidOpen, DocumentFocusLost, DocumentSaved},
|
||||||
graphics::{CursorKind, Rect},
|
graphics::{CursorKind, Rect},
|
||||||
|
|
|
@ -39,8 +39,6 @@ impl Info {
|
||||||
.unwrap();
|
.unwrap();
|
||||||
let mut text = String::new();
|
let mut text = String::new();
|
||||||
|
|
||||||
let mut height = 0;
|
|
||||||
|
|
||||||
for (item, desc) in body {
|
for (item, desc) in body {
|
||||||
let mut line_iter = desc.as_ref().lines();
|
let mut line_iter = desc.as_ref().lines();
|
||||||
|
|
||||||
|
@ -52,12 +50,10 @@ impl Info {
|
||||||
first_line,
|
first_line,
|
||||||
width = item_width
|
width = item_width
|
||||||
);
|
);
|
||||||
height += 1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
for line in line_iter {
|
for line in line_iter {
|
||||||
let _ = writeln!(text, "{:width$} {}", "", line, width = item_width);
|
let _ = writeln!(text, "{:width$} {}", "", line, width = item_width);
|
||||||
height += 1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue