Comments (1)
The following DIFF describes a fix. Additionally, the ESCAPE key can be used to delete the whole line.
diff --git "a/C:\\DOKUME~1\\Harald\\LOKALE~1\\Temp\\TortoiseGit\\Int8CA.tmp\\InteractiveInterpreterConsole-8981b6c-left.boo" "b/C:\\Boo\\boo_master\\boo\\src\\Boo.Lang.Interpreter\\InteractiveInterpreterConsole.boo" index 300dd92..3494ef9 100644 --- "a/C:\\DOKUME~1\\Harald\\LOKALE~1\\Temp\\TortoiseGit\\Int8CA.tmp\\InteractiveInterpreterConsole-8981b6c-left.boo" +++ "b/C:\\Boo\\boo_master\\boo\\src\\Boo.Lang.Interpreter\\InteractiveInterpreterConsole.boo" @@ -257,11 +257,13 @@ class InteractiveInterpreterConsole: _indent-- protected def Delete(count as int): #if count is 0, forward-delete + return if LineLen == 0 cx = Console.CursorLeft-len(CurrentPrompt)-count - return if cx < LineLen and count == 0 + count=1 if cx >= LineLen and count == 0 + return if cx >= LineLen dcount = (count if count != 0 else 1) _line.Remove(cx, dcount) - curX = Console.CursorLeft - dcount + curX = Console.CursorLeft - count Console.CursorLeft = curX Console.Write("${_line.ToString(cx, LineLen-cx)} ") Console.CursorLeft = curX @@ -368,7 +370,16 @@ class InteractiveInterpreterConsole: DisplaySuggestions() else: Indent() - + + # delete the whole line + if key == ConsoleKey.Escape: + curX = len(CurrentPrompt) + sizeL = _line.Length + _line.Remove(0, sizeL) + Console.CursorLeft = curX + Console.Write(string(' '[0], sizeL)) + Console.CursorLeft = curX + #line-editing support if not _multiline and LineLen > 0: if Console.CursorLeft > len(CurrentPrompt): @@ -580,7 +591,7 @@ Enter boo code in the prompt below (or type /help).""" WithColor color: for problem as duck in problems: markLocation(problem.LexicalInfo) - type = ("WARNING", "ERROR")[problem isa CompilerError] + type = ("ERROR" if problem isa CompilerError else "WARNING") Console.WriteLine("${type}: ${problem.Message}") return true
from boo.
Related Issues (20)
- Boo language roadmap HOT 3
- Having trouble installing on Linux and windows HOT 14
- Language Specification HOT 1
- .NET 5 future support ? HOT 11
- Problem with generic constraints on a generic specialization of the same type
- State of Boo HOT 37
- assertion and SIGABRT when building Boo.NAnt.Tasks with Mono 6 HOT 2
- ./nant fails on Compiler and booc HOT 10
- unmanaged struct Context64 HOT 5
- Migrate from NAnt? HOT 10
- How to use Delegates HOT 2
- Assert in SRE during Boo compiler run with Mono 6.x HOT 2
- Boo Compiling issues HOT 4
- Docs link occasionally redirects to chaturbate HOT 1
- How can i ref to value when calling function from DllImport HOT 24
- Compiled Boo Distribution HOT 3
- latest unstable release HOT 1
- domain is broken boo-lang.org HOT 6
- Targetting .net core HOT 1
- :((((
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from boo.