]> Repositorios git - scryer-prolog.git/commitdiff
get_single_char reads Enter as \n
authornotoria <[email protected]>
Sat, 18 Apr 2020 11:30:52 +0000 (13:30 +0200)
committernotoria <[email protected]>
Sat, 18 Apr 2020 11:30:52 +0000 (13:30 +0200)
src/prolog/machine/system_calls.rs

index bd35d6e6f06b461301c125cf6742765b2a51b6b2..1b2f48f0317cada070c9fbdb186e812012cdde73 100644 (file)
@@ -77,6 +77,10 @@ pub fn get_single_char() -> char {
                     c = ch;
                     break;
                 },
+                KeyCode::Enter => {
+                    c = '\n';
+                    break;
+                },
                 _ => ()
             }
         }