lanurmi / efte

eFTE is a fork of FTE -- Folding Text Editor
GNU General Public License v2.0
31 stars 11 forks source link

Directory fails on 64 bit windows; and 4k displays #105

Open d3x0r opened 4 years ago

d3x0r commented 4 years ago

The file find object (s_direct) returns 'int' which is only 32 bit. The HANDLE received from FindFirst etc is a void* which is 64 bit on a 64 bit system...

Also in console.h

define ConMaxCols 256

should be larger. On a 4k monitor is is easy to exceed 256 characters... not sure how much else this will break. I've increased it to 1024 ATM, although 512 is probably enough.

Related PR should be made soon..

d3x0r commented 4 years ago

image

Screen shot - 6x8 font, 597 characters.

lanurmi commented 4 years ago

Thank you for reporting these problems. I'll have a look at the HANDLE issue as soon as possible.

d3x0r commented 4 years ago

the fix for width was pretty easy; but there's issues still with opening files.. I would expect the configuration for EFTE to be relative to the efte.exe exeutable itself, so a good path to add to check would be GetModuleName( NULL, buf, bufSize ); which is the full path to the exeutable, and chop the last slash...

d3x0r commented 4 years ago

it also doesn't do a good job of outputting unicode characters. It outputs '?' I don't know if it's a limitation in the console font maybe?

This is a sample of some code..

# in EFTE (shouldn't be showing utf8-character parts
    if ( ( typeof (maker_key) !== "string" ) && ( "Λ" in maker_key ) ) real_key = keyTracker.keys.get(maker_key.Λ)

# in another console editor (correct)
        if ( ( typeof (maker_key) !== "string" ) && ( "Λ" in maker_key ) ) real_key = keyTracker.keys.get(maker_key.Λ); 
lanurmi commented 4 years ago

it also doesn't do a good job of outputting unicode characters. It outputs '?' I don't know if it's a limitation in the console font maybe?

eFTE doesn't unfortunately support Unicode. Would be nice if it did, but it's a huge task to make the code Unicode-aware.

d3x0r commented 4 years ago

I haven't fully looked, but efte and utf-8 on linux through slang works pretty good as a model....

d3x0r commented 4 years ago

Hmm. I looked more. Yes, I understand, no unicode. And in implementing unicode, I'd want to implement it with like UCS-32 internally; but that doesn't even account for clusters and stuff...

I also thought tab-completion worked in the directory screen? (does on my older fte build) maybe I have a keymap wrong...

d3x0r commented 4 years ago

I have a dirty branch that has the fix for handle - that works when NT is not defined. Forked the h_c.cpp to h_js.cpp to start a js syntax highlighter.... originally I just added the config, but back-tick strings

const string = `format ${"something"}` 

So then I can strip out some c-centric things and improve object highlighting (maybe)

I say my branch is 'dirty' because I've included Wordstar keyboard, but mangled it - I should just copy that to a myfte.config thing...