minor: view!(..).doc is slightly more efficient than current!(..).1.id()
This commit is contained in:
parent
4c1321b3b6
commit
f659e1178a
@ -2196,8 +2196,7 @@ fn vsplit(
|
||||
args: &[&str],
|
||||
_event: PromptEvent,
|
||||
) -> anyhow::Result<()> {
|
||||
let (_, doc) = current!(cx.editor);
|
||||
let id = doc.id();
|
||||
let id = view!(cx.editor).doc;
|
||||
|
||||
if let Some(path) = args.get(0) {
|
||||
cx.editor.open(path.into(), Action::VerticalSplit)?;
|
||||
@ -2213,8 +2212,7 @@ fn hsplit(
|
||||
args: &[&str],
|
||||
_event: PromptEvent,
|
||||
) -> anyhow::Result<()> {
|
||||
let (_, doc) = current!(cx.editor);
|
||||
let id = doc.id();
|
||||
let id = view!(cx.editor).doc;
|
||||
|
||||
if let Some(path) = args.get(0) {
|
||||
cx.editor.open(path.into(), Action::HorizontalSplit)?;
|
||||
|
Loading…
Reference in New Issue
Block a user