First completion level is working (LSP connected)
This commit is contained in:
+7
-5
@@ -9,6 +9,8 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "include/utils.h"
|
||||
|
||||
extern struct editorConfig E;
|
||||
|
||||
/**
|
||||
@@ -19,7 +21,7 @@ void splitScreenInit(void) {
|
||||
E.layout.num_panes = 1;
|
||||
E.layout.active_pane = 0;
|
||||
|
||||
E.layout.panes = malloc(sizeof(EditorPane) * 2);
|
||||
E.layout.panes = bAlloc(sizeof(EditorPane) * 2);
|
||||
|
||||
// Initialize single fullscreen pane
|
||||
E.layout.panes[0].buffer_id = -1; // No buffer for now
|
||||
@@ -48,8 +50,8 @@ int splitScreenVertical(int buffer_id_left, int buffer_id_right) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Reallocate panes array
|
||||
E.layout.panes = realloc(E.layout.panes, sizeof(EditorPane) * 2);
|
||||
// bReallocate panes array
|
||||
E.layout.panes = bRealloc(E.layout.panes, sizeof(EditorPane) * 2);
|
||||
E.layout.mode = SPLIT_VERTICAL;
|
||||
E.layout.num_panes = 2;
|
||||
E.layout.active_pane = 0;
|
||||
@@ -99,8 +101,8 @@ int splitScreenHorizontal(int buffer_id_top, int buffer_id_bottom) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Reallocate panes array
|
||||
E.layout.panes = realloc(E.layout.panes, sizeof(EditorPane) * 2);
|
||||
// bReallocate panes array
|
||||
E.layout.panes = bRealloc(E.layout.panes, sizeof(EditorPane) * 2);
|
||||
E.layout.mode = SPLIT_HORIZONTAL;
|
||||
E.layout.num_panes = 2;
|
||||
E.layout.active_pane = 0;
|
||||
|
||||
Reference in New Issue
Block a user