Compare commits

..

1 Commits

Author SHA1 Message Date
7c3f461677 fix(scroll): handle edge case of extremely long messages
Some checks failed
CI Code / Check spelling (pull_request) Successful in 19s
CI Code / Check coding style (pull_request) Failing after 34s
CI Code / Linux (arch) (pull_request) Has been cancelled
CI Code / Linux (debian) (pull_request) Has been cancelled
CI Code / Linux (ubuntu) (pull_request) Has been cancelled
Prior commit (6ad8a190) did not properly handle overflow by long (9000 lines) message,
to address this issue, multiple changes were made:
- Add lines recalculation on win_redraw
- Move `prof_buff_t` struct to header file so its lines could be externally changed
- Call win_redraw once overflow is detected: it allows to recalculate sizes in lines and apply changes to the buffer
2025-10-08 12:52:25 +02:00
5 changed files with 11 additions and 14 deletions

View File

@@ -5,7 +5,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
autoconf-archive \
automake \
ca-certificates \
expect \
gcc \
git \
@@ -37,7 +36,7 @@ RUN mkdir -p /usr/src/{stabber,libstrophe,profanity}
WORKDIR /usr/src
#RUN git clone https://github.com/boothj5/stabber
RUN git clone --depth 1 https://git.jabber.space/devs/libstrophe-gh.git libstrophe
RUN git clone -c http.sslverify=false https://github.com/strophe/libstrophe
#WORKDIR /usr/src/stabber
#RUN ./bootstrap.sh
@@ -48,7 +47,7 @@ RUN git clone --depth 1 https://git.jabber.space/devs/libstrophe-gh.git libstrop
WORKDIR /usr/src/libstrophe
RUN ./bootstrap.sh
RUN ./configure --prefix=/usr
RUN make -j$(nproc)
RUN make
RUN make install
WORKDIR /usr/src/profanity

View File

@@ -9,7 +9,6 @@ RUN dnf install -y \
autoconf-archive \
automake \
awk \
ca-certificates \
expect-devel \
gcc \
git \
@@ -57,11 +56,11 @@ WORKDIR /usr/src
WORKDIR /usr/src
RUN mkdir -p /usr/src/libstrophe
RUN git clone --depth 1 https://git.jabber.space/devs/libstrophe-gh.git libstrophe
RUN git clone -c http.sslverify=false https://github.com/strophe/libstrophe
WORKDIR /usr/src/libstrophe
RUN ./bootstrap.sh
RUN ./configure --prefix=/usr
RUN make -j$(nproc)
RUN make
RUN make install
RUN mkdir -p /usr/src/profanity

View File

@@ -6,7 +6,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
autoconf \
autoconf-archive \
automake \
ca-certificates \
expect \
gcc \
git \
@@ -38,7 +37,7 @@ RUN mkdir -p /usr/src/{stabber,libstrophe,profanity}
WORKDIR /usr/src
#RUN git clone https://github.com/boothj5/stabber
RUN git clone --depth 1 https://git.jabber.space/devs/libstrophe-gh.git libstrophe
RUN git clone -c http.sslverify=false https://github.com/strophe/libstrophe
# TODO: Re-enable once libmicrohttpd-dev has been updated.
#WORKDIR /usr/src/stabber
@@ -50,7 +49,7 @@ RUN git clone --depth 1 https://git.jabber.space/devs/libstrophe-gh.git libstrop
WORKDIR /usr/src/libstrophe
RUN ./bootstrap.sh
RUN ./configure --prefix=/usr
RUN make -j$(nproc)
RUN make
RUN make install
WORKDIR /usr/src/profanity

View File

@@ -121,11 +121,11 @@ esac
case "$ARCH" in
linux*)
echo
echo "--> Building with ./configure -C ${tests[0]} --enable-valgrind $*"
echo "--> Building with ./configure ${tests[0]} --enable-valgrind $*"
echo
# shellcheck disable=SC2086
./configure -C ${tests[0]} --enable-valgrind $*
./configure ${tests[0]} --enable-valgrind $*
$MAKE CC="${CC}"
if grep '^ID=' /etc/os-release | grep -q -e debian; then
@@ -140,11 +140,11 @@ esac
for features in "${tests[@]}"
do
echo
echo "--> Building with ./configure -C ${features} $*"
echo "--> Building with ./configure ${features} $*"
echo
# shellcheck disable=SC2086
./configure -C $features $*
./configure $features $*
$MAKE CC="${CC}"
$MAKE check

View File

@@ -114,7 +114,7 @@ _buffer_add(ProfBuff buffer, const char* show_char, int pad_indent, GDateTime* t
int old_lines = buffer->lines;
win_redraw(wins_get_current());
log_debug("Ncurses Overflow! From: %s, position: %d, ID: %s, append: %s, used message buffer size: %d, rendered lines: (old: %d/ actual: %d/ max: %d)",
from_jid, y_start_pos, id, append ? "TRUE" : "FALSE", g_slist_length(buffer->entries), old_lines, buffer->lines, PAD_SIZE);
from_jid, y_start_pos, id, append ? "TRUE" : "FALSE", g_slist_length(buffer->entries), old_lines, buffer->lines, PAD_SIZE);
}
buffer->entries = append ? g_slist_append(buffer->entries, e) : g_slist_prepend(buffer->entries, e);