Compare commits
No commits in common. "0bef3ce2e18296b9d4364df53c239e2c71d34211" and "9026404d6d649ad4089a4b9b13bd7f399eb303ee" have entirely different histories.
0bef3ce2e1
...
9026404d6d
1 changed files with 1 additions and 3 deletions
|
|
@ -3759,8 +3759,6 @@ pub const Editor = struct {
|
|||
var cursel: CurSel = .{};
|
||||
cursel.cursor = cursor;
|
||||
try move_cursor_begin(root, &cursel.cursor, self.metrics);
|
||||
if (root.line_width(cursel.cursor.row, self.metrics) catch 0 == 0)
|
||||
return root;
|
||||
switch (self.indent_mode) {
|
||||
.spaces, .auto => {
|
||||
const cols = self.indent_size - find_first_non_ws(root, cursel.cursor.row, self.metrics) % self.indent_size;
|
||||
|
|
@ -4524,7 +4522,7 @@ pub const Editor = struct {
|
|||
|
||||
fn cursel_smart_insert_line(self: *Self, root: Buffer.Root, cursel: *CurSel, b_allocator: std.mem.Allocator, mode: WSCollapseMode) !Buffer.Root {
|
||||
const row = cursel.cursor.row;
|
||||
const leading_ws = find_first_non_ws(root, row, self.metrics);
|
||||
const leading_ws = @min(find_first_non_ws(root, row, self.metrics), cursel.cursor.col);
|
||||
var sfa = std.heap.stackFallback(512, self.allocator);
|
||||
const sfa_allocator = sfa.get();
|
||||
var stream: std.Io.Writer.Allocating = .init(sfa_allocator);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue