mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-05 16:21:15 -03:00
Reduce warnings on is_console_session
This commit is contained in:
committed by
Johannes Altmanninger
parent
99fdcd725b
commit
e21eea6ac6
@@ -3,8 +3,8 @@
|
||||
//!
|
||||
//! Many of these functions are more or less broken and incomplete.
|
||||
|
||||
use crate::wchar::prelude::*;
|
||||
use crate::widecharwidth::{WcLookupTable, WcWidth};
|
||||
use crate::{common::is_console_session, wchar::prelude::*};
|
||||
use errno::{errno, Errno};
|
||||
use once_cell::sync::Lazy;
|
||||
use std::cmp;
|
||||
@@ -50,7 +50,7 @@ pub fn fish_wcwidth(c: char) -> isize {
|
||||
// in the console session, but knows nothing about the capabilities of other terminal emulators
|
||||
// or ttys. Use it from the start only if we are logged in to the physical console.
|
||||
#[cfg(not(target_os = "cygwin"))]
|
||||
if is_console_session() {
|
||||
if crate::common::is_console_session() {
|
||||
return wcwidth(c);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user