Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.9 #153

Merged
merged 15 commits into from
Apr 30, 2023
Merged

0.9 #153

merged 15 commits into from
Apr 30, 2023

Commits on Mar 18, 2022

  1. avoid potential UB when using isprint()

    all the ctype.h functions' argument must be representable as an unsigned
    char or as EOF, otherwise the behavior is undefined.
    N-R-K authored and hiltjo committed Mar 18, 2022
    Configuration menu
    Copy the full SHA
    af3bb68 View commit details
    Browse the repository at this point in the history
  2. base64_digits: reduce scope, implicit zero, +1 size

    the array is not accessed outside of base64dec() so it makes sense to
    limit it's scope to the related function. the static-storage duration of
    the array is kept intact.
    
    this also removes unnecessary explicit zeroing from the start and end of
    the array. anything that wasn't explicitly zero-ed will now be
    implicitly zero-ed instead.
    
    the validity of the new array can be easily confirmed via running this
    trivial loop:
    
    	for (int i = 0; i < 255; ++i)
    		assert(base64_digits[i] == base64_digits_old[i]);
    
    lastly, as pointed out by Roberto, the array needs to have 256 elements
    in order to able access it as any unsigned char as an index; the
    previous array had 255.
    
    however, this array will only be accessed at indexes which are
    isprint() || '=' (see `base64dec_getc()`), so reducing the size of the
    array to the highest printable ascii char (127 AFAIK) + 1 might also be
    a valid strategy.
    N-R-K authored and hiltjo committed Mar 18, 2022
    Configuration menu
    Copy the full SHA
    ef05519 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2022

  1. code-golfing: cleanup osc color related code

    * adds missing function prototype
    * move xgetcolor() prototype to win.h (that's where all the other x.c
      func prototype seems to be declared at)
    * check for snprintf error/truncation
    * reduces code duplication for osc 10/11/12
    * unify osc_color_response() and osc4_color_response() into a single function
    
    the latter two was suggested by Quentin Rameau in his patch review on
    the hackers list.
    N-R-K authored and hiltjo committed Apr 19, 2022
    Configuration menu
    Copy the full SHA
    8629d9a View commit details
    Browse the repository at this point in the history

Commits on May 1, 2022

  1. Configuration menu
    Copy the full SHA
    baa9357 View commit details
    Browse the repository at this point in the history

Commits on Aug 18, 2022

  1. Configuration menu
    Copy the full SHA
    72fd327 View commit details
    Browse the repository at this point in the history

Commits on Sep 16, 2022

  1. Configuration menu
    Copy the full SHA
    0008519 View commit details
    Browse the repository at this point in the history

Commits on Oct 4, 2022

  1. bump version to 0.9

    hiltjo committed Oct 4, 2022
    Configuration menu
    Copy the full SHA
    68d1ad9 View commit details
    Browse the repository at this point in the history

Commits on Oct 25, 2022

  1. fix buffer overflow when handling long composed input

    To reproduce the issue:
    
    "
    If you already have the multi-key enabled on your system, then add this line
    to your ~/.XCompose file:
    
    [...]
    <question> <T> <E> <S> <T> <question> :
    "1234567890123456789012345678901234567890123456789012345678901234567890"
    "
    
    Reported by and an initial patch by Andy Gozas <andy@gozas.me>, thanks!
    
    Adapted the patch, for now st (like dmenu) handles a fixed amount of composed
    characters, or otherwise ignores it. This is done for simplicity sake.
    hiltjo committed Oct 25, 2022
    Configuration menu
    Copy the full SHA
    e5e9598 View commit details
    Browse the repository at this point in the history

Commits on Feb 5, 2023

  1. Fixed OSC color reset without parameter->resets all colors

    Adapted from (garbled) patch by wim <wim@thinkerwim.org>
    
    Additional notes: it should reset all the colors using xloadcols().
    To reproduce: set a different (theme) color using some escape code, then reset
    it:
    
    	printf '\x1b]104\x07'
    hiltjo committed Feb 5, 2023
    Configuration menu
    Copy the full SHA
    7e8050c View commit details
    Browse the repository at this point in the history

Commits on Feb 7, 2023

  1. Add support for DSR response "OK" escape sequence

    "VT100 defines an escape sequence [1] called Device Status Report (DSR). When
    the DSR sequence received is `csi 5n`, an "OK" response `csi 0n` is returned.
    This patch adds that "OK" response.
    
    I encountered this missing sequence when I noticed that fzf [2] would clobber
    my prompt whenever completing a find.
    
    To test that ST doesn't currently respond to `csi 5n`, use fzf's shell
    extension in ST's repo to complete the path for a file.
    
        my-fancy-prompt $ vim **<tab>
        <select a file>
        st.c
    
    Select a file with <enter>, and notice that fzf clobbers some or all of your
    prompt.
    
    After applying this patch, do the same test as above and notice that fzf has no
    longer clobbered your prompt by placing the file name in the correct position
    in your command.
    
        my-fancy-prompt $ vim **<tab>
        <select a file>
        my-fancy prompt $ vim st.c
    
    Thank you for considering my first patch submission.
    
    [1] https://www.xfree86.org/current/ctlseqs.html#VT100%20Mode
    [2] https://github.com/junegunn/fzf
    "
    
    Patch slightly adapted with input from the mailinglist,
    komidore64 authored and hiltjo committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    f17abd2 View commit details
    Browse the repository at this point in the history
  2. ignore C1 control characters in UTF-8 mode

    Ignore processing and printing C1 control characters in UTF-8 mode.
    These are in the range: 0x80 - 0x9f.
    
    By default in st the mode is set to UTF-8.
    
    This matches more the behaviour of xterm with the options -u8 or +u8 also.
    Also see the xterm resource "allowC1Printable".
    
    Let me know if this breaks something, in most cases I don't think so.
    
    As usual a very good reference is:
    https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
    hiltjo committed Feb 7, 2023
    Configuration menu
    Copy the full SHA
    211964d View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2023

  1. Configuration menu
    Copy the full SHA
    7192fed View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6b23dc3 View commit details
    Browse the repository at this point in the history
  3. icon patch

    fixes #20
    neeasade committed Feb 13, 2023
    Configuration menu
    Copy the full SHA
    75a5f20 View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2023

  1. rm unsigned

    fixes #130
    neeasade committed Apr 29, 2023
    Configuration menu
    Copy the full SHA
    54618f0 View commit details
    Browse the repository at this point in the history