Small fixes
This commit is contained in:
10
build.sh
10
build.sh
@@ -47,10 +47,12 @@ if [ ! -f "lbaselib.o" ]; then
|
|||||||
-c
|
-c
|
||||||
fi
|
fi
|
||||||
|
|
||||||
clang ../src/metaprogram/metaprogram.cpp -o metaprogram.exe \
|
if [ ! -f "metaprogram.exe" ]; then
|
||||||
-nostdlib++ -fno-exceptions -fdiagnostics-absolute-paths -g \
|
clang ../src/metaprogram/metaprogram.cpp -o metaprogram.exe \
|
||||||
-Wno-writable-strings \
|
-nostdlib++ -fno-exceptions -fdiagnostics-absolute-paths -g \
|
||||||
-I../src
|
-Wno-writable-strings \
|
||||||
|
-I../src
|
||||||
|
fi
|
||||||
./metaprogram.exe
|
./metaprogram.exe
|
||||||
|
|
||||||
clang ../src/text_editor/text_editor.cpp ../src/basic/unix.cpp -o te_linux.exe \
|
clang ../src/text_editor/text_editor.cpp ../src/basic/unix.cpp -o te_linux.exe \
|
||||||
|
|||||||
@@ -333,7 +333,6 @@ function MatchExec(s, meta)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if s:match("^%$") then
|
if s:match("^%$") then
|
||||||
Print(s:sub(2, -1))
|
|
||||||
return {kind = "exec_console", cmd = s:sub(2, -1), working_dir = GetMainDir()}
|
return {kind = "exec_console", cmd = s:sub(2, -1), working_dir = GetMainDir()}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -226,7 +226,6 @@ void ReportWarningf(const char *fmt, ...) {
|
|||||||
void Command_MoveCursorsByPageSize(Window *window, int direction, bool shift = false) {
|
void Command_MoveCursorsByPageSize(Window *window, int direction, bool shift = false) {
|
||||||
Assert(direction == DIR_UP || direction == DIR_DOWN);
|
Assert(direction == DIR_UP || direction == DIR_DOWN);
|
||||||
BSet set = GetBSet(window);
|
BSet set = GetBSet(window);
|
||||||
CheckpointBeforeGoto(window);
|
|
||||||
|
|
||||||
Rect2I visible_cells_rect = GetVisibleCells(window);
|
Rect2I visible_cells_rect = GetVisibleCells(window);
|
||||||
Int y = GetSize(visible_cells_rect).y - 2;
|
Int y = GetSize(visible_cells_rect).y - 2;
|
||||||
@@ -1104,6 +1103,7 @@ int Lua_C(lua_State *L) {
|
|||||||
BSet Command_Open(Window *window, String path, String meta, bool set_active = true) {
|
BSet Command_Open(Window *window, String path, String meta, bool set_active = true) {
|
||||||
Scratch scratch;
|
Scratch scratch;
|
||||||
BSet set = GetBSet(window);
|
BSet set = GetBSet(window);
|
||||||
|
path = Trim(path);
|
||||||
OnOpenResult ores = CallOnOpen(scratch, path, meta);
|
OnOpenResult ores = CallOnOpen(scratch, path, meta);
|
||||||
if (ores.kind == "text") {
|
if (ores.kind == "text") {
|
||||||
if (set_active) {
|
if (set_active) {
|
||||||
|
|||||||
@@ -356,12 +356,10 @@ void OnCommand(Event event) {
|
|||||||
} else if (AltShiftPress(SDLK_DOWN)) {
|
} else if (AltShiftPress(SDLK_DOWN)) {
|
||||||
Command_CreateCursorVertical(active.view, DIR_DOWN);
|
Command_CreateCursorVertical(active.view, DIR_DOWN);
|
||||||
} else if (CtrlShiftPress(SDLK_DOWN)) {
|
} else if (CtrlShiftPress(SDLK_DOWN)) {
|
||||||
CheckpointBeforeGoto(active.window);
|
|
||||||
Command_Move(active.view, DIR_DOWN, CTRL_PRESSED, SHIFT_PRESSED);
|
Command_Move(active.view, DIR_DOWN, CTRL_PRESSED, SHIFT_PRESSED);
|
||||||
} else if (AltPress(SDLK_DOWN)) {
|
} else if (AltPress(SDLK_DOWN)) {
|
||||||
Command_MoveLine(active.view, DIR_DOWN);
|
Command_MoveLine(active.view, DIR_DOWN);
|
||||||
} else if (CtrlPress(SDLK_DOWN)) {
|
} else if (CtrlPress(SDLK_DOWN)) {
|
||||||
CheckpointBeforeGoto(active.window);
|
|
||||||
Command_Move(active.view, DIR_DOWN, CTRL_PRESSED);
|
Command_Move(active.view, DIR_DOWN, CTRL_PRESSED);
|
||||||
} else if (ShiftPress(SDLK_DOWN)) {
|
} else if (ShiftPress(SDLK_DOWN)) {
|
||||||
Command_Move(active.view, DIR_DOWN, false, SHIFT_PRESSED);
|
Command_Move(active.view, DIR_DOWN, false, SHIFT_PRESSED);
|
||||||
@@ -374,12 +372,10 @@ void OnCommand(Event event) {
|
|||||||
} else if (AltShiftPress(SDLK_UP)) {
|
} else if (AltShiftPress(SDLK_UP)) {
|
||||||
Command_CreateCursorVertical(active.view, DIR_UP);
|
Command_CreateCursorVertical(active.view, DIR_UP);
|
||||||
} else if (CtrlShiftPress(SDLK_UP)) {
|
} else if (CtrlShiftPress(SDLK_UP)) {
|
||||||
CheckpointBeforeGoto(active.window);
|
|
||||||
Command_Move(active.view, DIR_UP, CTRL_PRESSED, SHIFT_PRESSED);
|
Command_Move(active.view, DIR_UP, CTRL_PRESSED, SHIFT_PRESSED);
|
||||||
} else if (AltPress(SDLK_UP)) {
|
} else if (AltPress(SDLK_UP)) {
|
||||||
Command_MoveLine(active.view, DIR_UP);
|
Command_MoveLine(active.view, DIR_UP);
|
||||||
} else if (CtrlPress(SDLK_UP)) {
|
} else if (CtrlPress(SDLK_UP)) {
|
||||||
CheckpointBeforeGoto(active.window);
|
|
||||||
Command_Move(active.view, DIR_UP, CTRL_PRESSED);
|
Command_Move(active.view, DIR_UP, CTRL_PRESSED);
|
||||||
} else if (ShiftPress(SDLK_UP)) {
|
} else if (ShiftPress(SDLK_UP)) {
|
||||||
Command_Move(active.view, DIR_UP, false, SHIFT_PRESSED);
|
Command_Move(active.view, DIR_UP, false, SHIFT_PRESSED);
|
||||||
@@ -507,7 +503,7 @@ void OnCommand(Event event) {
|
|||||||
MergeCarets(active.buffer, &active.view->carets);
|
MergeCarets(active.buffer, &active.view->carets);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (AltPress(SDLK_N)) {
|
if (CtrlShiftPress(SDLK_N)) {
|
||||||
Scratch scratch;
|
Scratch scratch;
|
||||||
String16 search_string = GetSearchString(main.window);
|
String16 search_string = GetSearchString(main.window);
|
||||||
Caret caret = FindPrev(main.buffer, search_string, main.view->carets[0]);
|
Caret caret = FindPrev(main.buffer, search_string, main.view->carets[0]);
|
||||||
|
|||||||
@@ -334,7 +334,6 @@ function MatchExec(s, meta)
|
|||||||
end
|
end
|
||||||
|
|
||||||
if s:match("^%$") then
|
if s:match("^%$") then
|
||||||
Print(s:sub(2, -1))
|
|
||||||
return {kind = "exec_console", cmd = s:sub(2, -1), working_dir = GetMainDir()}
|
return {kind = "exec_console", cmd = s:sub(2, -1), working_dir = GetMainDir()}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -5,11 +5,6 @@ Array<Process> ActiveProcesses = {};
|
|||||||
// and platform independent one
|
// and platform independent one
|
||||||
Array<String> Enviroment = {};
|
Array<String> Enviroment = {};
|
||||||
|
|
||||||
struct UnixProcess {
|
|
||||||
pid_t pid;
|
|
||||||
int child_stdout_read;
|
|
||||||
};
|
|
||||||
|
|
||||||
// WARNING: seems that this maybe can't work reliably?
|
// WARNING: seems that this maybe can't work reliably?
|
||||||
// in case of 'git grep a' it's possible that child process spawns it's own
|
// in case of 'git grep a' it's possible that child process spawns it's own
|
||||||
// child process and then it won't print anything because it won't have
|
// child process and then it won't print anything because it won't have
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "basic/basic.h"
|
#include "basic/basic.h"
|
||||||
#include "basic/filesystem.h"
|
#include "basic/filesystem.h"
|
||||||
#include "basic/linked_list.h"
|
#include "basic/linked_list.h"
|
||||||
|
|
||||||
#include "basic/string16.cpp"
|
#include "basic/string16.cpp"
|
||||||
#include "basic/math_int.cpp"
|
#include "basic/math_int.cpp"
|
||||||
#include "basic/math.cpp"
|
#include "basic/math.cpp"
|
||||||
|
|||||||
@@ -1,17 +1,15 @@
|
|||||||
DESIGN Config file versions, when loading should be checked, at the top of the file, what to do when old version?
|
DESIGN Config file versions, when loading should be checked, at the top of the file, what to do when old version?
|
||||||
BUILD Collapse the separate unit (unix, win32) into single build
|
|
||||||
|
|
||||||
DESIGN Prev search change hotkey to Ctrl+Shift instead of Alt+N
|
ISSUE Ctrl+Alt+Down (DuplicateLine) doesn't work on ubuntu
|
||||||
|
DESIGN Add debug buffer that will hold info on exit codes and other debug information
|
||||||
|
|
||||||
DESIGN Moving vertically between splits, which keys???
|
DESIGN Moving vertically between splits, which keys???
|
||||||
DESIGN Console, console write should be preprended with new line not appended
|
DESIGN Console, when writing commands and evaling in console it should properly insert a new line after our thing when writing on last line
|
||||||
DESIGN The cursor hopping history needs a bit of fixing, probably needs to be more complicated with collapsing commands etc. not sure
|
DESIGN The cursor hopping history needs a bit of fixing, probably needs to be more complicated with collapsing commands
|
||||||
OR maybe make it only for buffer history, and shouldnt care about cursor history that much
|
|
||||||
FEATURE KillConsole, or maybe some window targetting but how??
|
FEATURE KillConsole, or maybe some window targetting but how??
|
||||||
FEATURE SaveAll dirty files which are saved on disk already but dirty
|
FEATURE SaveAll dirty files which are saved on disk already but dirty
|
||||||
|
|
||||||
ISSUE Cursor changes every frame and it causes stutter on screen NOT GOOD!
|
|
||||||
ISSUE I hit a case where GC tried deleting a buffer which was not attached to the buffer list, it had zeroed next, prev. It happened after iterating through directories using the ctrl + period
|
ISSUE I hit a case where GC tried deleting a buffer which was not attached to the buffer list, it had zeroed next, prev. It happened after iterating through directories using the ctrl + period
|
||||||
ISSUE Ctrl + L or Exec shouldn't involve the last new line!
|
|
||||||
|
|
||||||
FEATURE Search whole words, case sensitive etc.
|
FEATURE Search whole words, case sensitive etc.
|
||||||
FEATURE Select all searched occurences
|
FEATURE Select all searched occurences
|
||||||
|
|||||||
Reference in New Issue
Block a user