Skip to content

Commit b2e0245

Browse files
authored
Merge pull request #132 from andyherbert/master
Bump to electron 7.0.1
2 parents 26566d5 + 53bc884 commit b2e0245

6 files changed

Lines changed: 314 additions & 792 deletions

File tree

app/document/tools/cursor.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,9 @@ class Cursor {
123123

124124
new_line() {
125125
if (this.mode != modes.EDITING) return;
126+
if (keyboard.insert_mode && this.y < doc.rows - 1) {
127+
this.insert_row(this.y + 1);
128+
}
126129
const old_x = this.x;
127130
this.move_to(0, Math.min(doc.rows - 1, this.y + 1));
128131
if (this.scroll_document_with_cursor) this.scroll(-old_x, 1);

app/menu.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ function file_menu_template(win) {
112112
{label: "Duplicate as New Document", id: "duplicate", click(item) {win.send("duplicate");}},
113113
{type: "separator"},
114114
{label: "Open\u2026", id: "open", accelerator: "CmdorCtrl+O", click(item) {event.emit("open", win);}},
115+
{label: "Open in Current Window\u2026", id: "open_in_current_window", accelerator: "CmdorCtrl+Shift+O", click(item) {event.emit("open_in_current_window", win);}},
115116
darwin ? {role: "recentDocuments", submenu: [{role: "clearRecentDocuments"}]} : ({type: "separator"}, {label: "Settings", click(item) {event.emit("preferences");}}),
116117
{type: "separator"},
117118
{label: "Revert to Last Save", id: "revert_to_last_save", click(item) {win.send("revert_to_last_save");}, enabled: false},

app/moebius.js

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ async function new_document_window() {
3131
const win_pos = win.getPosition();
3232
last_win_pos = win_pos;
3333
const debug = prefs.get("debug");
34-
docs[win.id] = {win, menu: menu.document_menu(win, debug), chat_input_menu: menu.chat_input_menu(win, debug), edited: false, win_pos, destroyed: false};
34+
docs[win.id] = {win, menu: menu.document_menu(win, debug), chat_input_menu: menu.chat_input_menu(win, debug), edited: false, win_pos, destroyed: false, open_in_current_window: false};
3535
touchbar.create_touch_bars(win);
3636
prefs.send(win);
3737
win.on("focus", (event) => {
@@ -99,6 +99,9 @@ async function open_file(file) {
9999
}
100100

101101
function open_in_new_window(win) {
102+
if (win && docs[win.id].open_in_current_window) {
103+
return false;
104+
}
102105
return !win || docs[win.id].network || docs[win.id].file || docs[win.id].edited;
103106
}
104107

@@ -120,6 +123,11 @@ function open(win) {
120123
menu.on("open", open);
121124
electron.ipcMain.on("open", (event) => open());
122125

126+
menu.on("open_in_current_window", (win) => {
127+
docs[win.id].open_in_current_window = true;
128+
open(win);
129+
});
130+
123131
async function preferences() {
124132
const preferences = await window.static("app/html/preferences.html", {width: 480, height: 670});
125133
preferences.send("prefs", prefs.get_all());

electron-builder.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,4 +52,4 @@ linux:
5252
target: deb
5353
description: Moebius is a new ANSI and ASCII Editor for Linux, MacOS, and Windows. The major feature that differentiates it from PabloDraw is the 'half-block' brush which allows editing in a style closer to Photoshop than a text editor, although you can still use the function and cursor keys to draw with, and you should find that most of the text editing features from PabloDraw are carried over to this editor.
5454
category: Graphics
55-
electronVersion: 6.0.8
55+
electronVersion: 7.0.1

0 commit comments

Comments
 (0)