Explorar el Código

Fix clearing with ctrl+k and ctrl+enter

Luna Stadler %!s(int64=4) %!d(string=hace) años
padre
commit
4198e37ae8
Se han modificado 1 ficheros con 8 adiciones y 1 borrados
  1. 8 1
      zig/sdl/hello_sdl.zig

+ 8 - 1
zig/sdl/hello_sdl.zig

@ -93,7 +93,13 @@ pub fn main() !void {
93 93
                            msg[pos] = '_';
94 94
                        },
95 95
                        c.SDLK_RETURN => {
96
                            result = runCommand(&msg);
96
                            result = runCommand(&msg, gpa);
97
                            var i: usize = 0;
98
                            while (i < max_chars) : (i += 1) {
99
                                msg[i] = ' ';
100
                            }
101
                            msg[max_chars] = 0;
102
                            pos = 0;
97 103
                        },
98 104
                        else => {},
99 105
                    }
@ -111,6 +117,7 @@ pub fn main() !void {
111 117
                                    msg[i] = ' ';
112 118
                                }
113 119
                                msg[max_chars] = 0;
120
                                pos = 0;
114 121
                            },
115 122
                            else => {},
116 123
                        }