Comments (8)
It also comes with a nifty selection rendering artifact:
from edwood.
And it would be difficult for me to argue that this is the correct behavior for '^'
from edwood.
Hm. I didn't get the background colours. But indeed, that's unfortunate.
from edwood.
This is unexpectedly ugly. Instead of porting the acme regexp, I used Go's builtin, and it matches up reasonably well. Until you want multiple "start of line" chars from a Reader. When you re-start, you get the "start of selection" match for ^, instead of the start of line. One solution is to find all of them, but the go regexp library offers FindReaderSubmatchIndex but not the FindAll variant.
from edwood.
How bad would it be if ^ matched not only newlines, but also start-of-range? That's the behaviour of the golang regexp, and it's bloody painful to work around. Enough that the Reader can't be told to ignore start-of-block matches on ^, which means expanding a []byte for our buffers. Augh. I have a plan for that that matches well with defragmenting the eventual data structure at least.
from edwood.
I think that it could be lived with? I think that I usually use the ^
on whole lines only so would seem fine?
from edwood.
Even more fun: acme itself is broken on $ matches. Select the middle line of
this is a
short text
to try Edit
and execute Edit x/$/a/junk/
Receive
this is ajunk
short text
to try Edit
rather than the expected
this is a
short textjunk
to try Edit
Edwood will get this right, and not match ^ and $ to start and end of range. Both will match start and end of document.
from edwood.
Fixed in 03f4790
Backwards searches remain broken.
from edwood.
Related Issues (20)
- Broken frame insertion since #436 HOT 2
- Crash when attempting to snarf text on Windows 10 HOT 4
- ReadRuneAt coding error
- how do I configure plumb rule on window system HOT 6
- Undo isn't grouping sets of typed characters together. HOT 1
- MacOS IME integration HOT 1
- Make CrLf invisible HOT 7
- Column widths adjust strangely on window resize HOT 2
- Repeatable crash HOT 3
- plan9port support HOT 1
- Occasional crash HOT 1
- Event file missing chorded messages. HOT 4
- fatal error in Buffer.undone reading inserted contents: EOF HOT 4
- Windows filename handling is utterly broken. HOT 5
- fix the CI waiting HOT 1
- Button 2 output to +Errors selects the text of the whole +Errors windows HOT 1
- Windows build doesn't draw into window? HOT 6
- Event file writes sometimes have Location in Arg HOT 2
- Cursor disappeared, clicks still delivered HOT 3
- draw.KeyDown not working (MacOS)
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 edwood.