Go to end, start
This commit is contained in:
@@ -221,6 +221,10 @@ function ApplyRules(s)
|
||||
return nil
|
||||
end
|
||||
|
||||
function CFiles()
|
||||
Cmd({working_dir = GetProjectPath(), destination ="a", cmd = "dir /s/b | findstr .*\\.c"})
|
||||
end
|
||||
|
||||
Coroutines = {}
|
||||
function AddCo(f)
|
||||
local i = #Coroutines + 1
|
||||
@@ -233,6 +237,8 @@ OnCommandCallbacks = {}
|
||||
table.insert(OnCommandCallbacks, function (e)
|
||||
if e.key == SDLK_F and e.ctrl == 1 and e.shift == 1 then
|
||||
C("git grep -n "..GetLoadWord().." :/") end
|
||||
if e.key == SDLK_B and e.ctrl == 1 then
|
||||
Cmd { working_dir = GetProjectPath(), destination = "console", cmd = "build.bat" } end
|
||||
end)
|
||||
|
||||
function OnUpdate(e)
|
||||
|
||||
@@ -540,12 +540,16 @@ void OnCommand(Event event) {
|
||||
|
||||
if (ShiftPress(SDLK_PAGEUP)) {
|
||||
Command_MoveCursorsByPageSize(active.window, DIR_UP, SHIFT_PRESSED);
|
||||
} else if (CtrlPress(SDLK_PAGEUP)) {
|
||||
Command_SelectRangeOneCursor(active.view, Rng(0));
|
||||
} else if (Press(SDLK_PAGEUP)) {
|
||||
Command_MoveCursorsByPageSize(active.window, DIR_UP);
|
||||
}
|
||||
|
||||
if (ShiftPress(SDLK_PAGEDOWN)) {
|
||||
Command_MoveCursorsByPageSize(active.window, DIR_DOWN, SHIFT_PRESSED);
|
||||
} else if (CtrlPress(SDLK_PAGEDOWN)) {
|
||||
Command_SelectRangeOneCursor(active.view, Rng(active.buffer->len));
|
||||
} else if (Press(SDLK_PAGEDOWN)) {
|
||||
Command_MoveCursorsByPageSize(active.window, DIR_DOWN);
|
||||
}
|
||||
|
||||
@@ -293,6 +293,10 @@ function ApplyRules(s)
|
||||
return nil
|
||||
end
|
||||
|
||||
function CFiles()
|
||||
Cmd({working_dir = GetProjectPath(), destination ="a", cmd = "dir /s/b | findstr .*\\.c"})
|
||||
end
|
||||
|
||||
Coroutines = {}
|
||||
function AddCo(f)
|
||||
local i = #Coroutines + 1
|
||||
@@ -305,6 +309,8 @@ OnCommandCallbacks = {}
|
||||
table.insert(OnCommandCallbacks, function (e)
|
||||
if e.key == SDLK_F and e.ctrl == 1 and e.shift == 1 then
|
||||
C("git grep -n "..GetLoadWord().." :/") end
|
||||
if e.key == SDLK_B and e.ctrl == 1 then
|
||||
Cmd { working_dir = GetProjectPath(), destination = "console", cmd = "build.bat" } end
|
||||
end)
|
||||
|
||||
function OnUpdate(e)
|
||||
|
||||
@@ -229,14 +229,16 @@ int Lua_GetLoadWord(lua_State *L) {
|
||||
}
|
||||
|
||||
int Lua_New(lua_State *L) {
|
||||
Scratch scratch;
|
||||
String name = luaL_checkstring(L, 1);
|
||||
lua_pop(L, 1);
|
||||
|
||||
BSet main = GetActiveMainSet();
|
||||
if (!IsAbsolute(name)) {
|
||||
String dir = GetDir(main.buffer);
|
||||
Scratch scratch;
|
||||
String new_dir = Format(scratch, "%.*s/%.*s", FmtString(dir), FmtString(name));
|
||||
WindowOpenBufferView(main.window, new_dir);
|
||||
name = Format(scratch, "%.*s/%.*s", FmtString(dir), FmtString(name));
|
||||
}
|
||||
WindowOpenBufferView(main.window, name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
!!As little lua code as possible, but lua code should be powerful just in case of quick edits
|
||||
- maybe we could allow user to change window titles which would make them special in some way. A:/text_editor/+test_buffer:1:1:ADE |
|
||||
- Windows, Buffers, Views should not be in a dynamic list it risks memory errors. Should be instead in a Double linked list, any freeing should happen at GC stage
|
||||
- Fix B: not opening
|
||||
- Scroll the console properly
|
||||
- commands for scrolling: center, cursor_at_bottom_of_screen, cursor_at_top
|
||||
- need a buffer for every window that will be cleared on command and replaced with new content
|
||||
|
||||
--------------
|
||||
buffer = make_buffer()
|
||||
@@ -18,7 +18,7 @@ activate_buffer
|
||||
- help menu popup when for example in process buffer, on tile bar buffer and stuff like that
|
||||
- report errors (try showing a window)
|
||||
- proper lister
|
||||
- revamp windows/layout/resize
|
||||
- Setting size of splits
|
||||
|
||||
- adding items to directory should create files on save - it should ask the user (syntax: dir/ | file)
|
||||
- ask user if he really wants to quit even though he has an unsaved buffer - popup window | we could just show ForceClose() in the titlebar
|
||||
@@ -48,7 +48,6 @@ backlog
|
||||
- we could rewrite kill lines with simpler commands - extend selection to encompass lines->replace
|
||||
- I want a way to assign flags to buffers/views/windows from user perspective so that console window concept can be created from user space
|
||||
- font cache and on demand unicode loads
|
||||
- Set scroll centered, what was the use case for this?
|
||||
- color parens, braces
|
||||
- redo tree
|
||||
- gap buffer
|
||||
|
||||
Reference in New Issue
Block a user