diff options
| author | bptato <nincsnevem662@gmail.com> | 2023-09-09 01:44:58 +0200 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2023-09-09 01:52:24 +0200 |
| commit | 11219c7d21c8ec7f438d52de063c4ac25f84711d (patch) | |
| tree | 36b1308d747cc467dc7dad2713eb2cc546390026 /src/buffer | |
| parent | 6c435aa6c186c2fe7ec72cee2a5ae2f1ae8b22a7 (diff) | |
| download | chawan-11219c7d21c8ec7f438d52de063c4ac25f84711d.tar.gz | |
add extern, refactor some term functions
* Add an extern() call. Maybe it should be defined on client. It
certainly should accept a dictionary instead of the enum type we use
now. Perhaps it should return the error code?
I'll leave it undocumented until I figure this out.
* Refactor enableRawMode, unblockStdin, etc. so that they operate on
the term object instead of global state.
* Move editor to a separate folder, and factor out runprocess into
a different module.
Diffstat (limited to 'src/buffer')
| -rw-r--r-- | src/buffer/container.nim | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/buffer/container.nim b/src/buffer/container.nim index 2a000bbf..edba490f 100644 --- a/src/buffer/container.nim +++ b/src/buffer/container.nim @@ -24,6 +24,8 @@ import types/url import utils/mimeguess import utils/twtstr +import chakasu/charset + type CursorPosition* = object cursorx*: int @@ -124,6 +126,9 @@ proc newBuffer*(forkserver: ForkServer, mainproc: Pid, config: BufferConfig, ) ) +func charset*(container: Container): Charset = + return container.source.charset + func contentType*(container: Container): Option[string] {.jsfget.} = return container.source.contenttype |