Skip to content

Commit

Permalink
Fixed errors that were hidden before
Browse files Browse the repository at this point in the history
  • Loading branch information
curlpipe committed Nov 2, 2024
1 parent 9548e27 commit 3959bbe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/config/editor.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
/// Defines the Editor API for plug-ins to use
use crate::cli::VERSION;
use crate::config::Document;
use crate::editor::Editor;
use crate::ui::Feedback;
use crate::{fatal_error, PLUGIN_BOOTSTRAP, PLUGIN_MANAGER, PLUGIN_NETWORKING, PLUGIN_RUN};
use crate::{config, fatal_error, PLUGIN_BOOTSTRAP, PLUGIN_MANAGER, PLUGIN_NETWORKING, PLUGIN_RUN};
use kaolinite::utils::{get_absolute_path, get_cwd, get_file_ext, get_file_name};
use kaolinite::{Loc, Size};
use mlua::prelude::*;
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,8 @@ fn run(cli: &CommandLineInterface) -> Result<()> {
.get("file_types")
.unwrap_or(Value::Table(lua.create_table()?));
let file_types = FileTypes::from_lua(file_types, &lua).unwrap_or_default();
let config = ged!(mut &editor).config;
let document = config.document.borrow_mut::<config::Document>().unwrap();
let config = &mut ged!(mut &editor).config;
let mut document = config.document.borrow_mut::<config::Document>().unwrap();
document.file_types = file_types;

// Open files user has asked to open
Expand Down

0 comments on commit 3959bbe

Please sign in to comment.